I'm building a site where users will be able to compare specs between products. Users can view specs for one single product where I only need specs for that specific product but they will also be able to compare the chosen product with any other product available on the site. I think I'm going to end up with something like 75-100 products.
All the specs are available in a global csv file. Each product has potentially 37 features and there are between 75-100. The size of this file is around 50Kb. I have also individual files for each product containing the same data but only for one product.
I was wondering what would be the best way to ensure a good performance:
Load the whole file in a $_SESSION to make it available all the time for all pages. This means that all data is loaded once and available all the time without any additional request but can this affect performance?
Load files individually whenever they are needed but that means that if someone starts comparing products (and that's the goal), php will have to read files all the time
Store data in a database and access it each time it is necessary
What would be the best option? If you think of any other solution, I'm also interested of course.
Thanks