I'm building a webpage that queries a MySQL database and (currently) produces a text-only list of the findings. The queries to complete a single record are similar to:
- movie (title, description, etc)
- actors in the movie (name, gender)
- related movies
Out of curiosity I've used memory_get_peak_usage()
and memory_get_usage()
:
start 110,440 bytes peak 656,056 bytes end 637,976 bytes time 0.008 seconds
The above is with no records found!
With 40 records I'm reaching approximately 2MB, though the time remains the same.
I know that premature optimization is evil and all, but I have to ask:
Do I need to do some reworking? Is this memory usage normal? What is considered excessive?