So I have a JSON file which is a cache of a API result that updates frequently, it has thousands of items (more than 110000 lines in total, currently stored as a text file and has 3.50 MB!) The PHP script has to itenerate through it hundreds of times when it runs. Obviously, it takes about 20 seconds to finish.
I was wondering if there is anything I could do to optimize it or maybe a different aproach.
Thanks