PHP write a very simple interface, with a JSON file to do a simple database, with the increase in data, will there be performance problems? Do you have performance issues with multiple meetings? The size of the JSON file is expected to grow slowly and should not exceed 5M in 1 years
Reply content:
PHP write a very simple interface, with a JSON file to do a simple database, with the increase in data, will there be performance problems? Do you have performance issues with multiple meetings? The size of the JSON file is expected to grow slowly and should not exceed 5M in 1 years
Tell me about my previous measurements: The 18.2M JSON contains 3 W arrays of entries for each array 60 or so, deserialized and then serialized, processing time of about 1 seconds or so
Also say: This kind of interface actual bottleneck will appear on the server's bandwidth, similar interface requests are more likely to block the network.
But in terms of your current volume, there will be no short-term problems.
Using a few grams of JSON, parsing time will have to wait a long time, a few 10 seconds. Not exactly measured.
5m The amount of data is not much, the design should not be a problem.
The JSON for dozens of M is second-level. No need to worry about performance issues. As long as your JSON specification is compact.
The problem is not big.
If you are really worried, then you'd better normalize your JSON file format and use Fseek+fread 1.1 to read.
I use the serialize and unserialize to do, JSON, you 1 years not over 5M, the volume should not be very large.
It's only 5M, it's duly completed. Using caching wisely can also improve efficiency.