Hi guys,
I'm struggling with an issue i couldnt find any answers by searching google.
Basically I have benchmarked two different php scripts, one that uses classes and page templating, meaning that the page to be displayed is first created from code and a template, then cached and then displayed to the user. While pretty fast, and very fast if its already cached, it takes aproximately 400kb of memory (im using the memory_get_usage function to find out how much memory is used)
The other script only uses functions and no templating at all, and has php code embedded in the html. This one, while slower in execution (time wise), takes a maximum of 150kb of memory on a run.
Note that on the script that uses classes, most of the classes are extended from parent classes.
Now my question is how important is memory usage here, i mean does php use ram or virtual memory, and how much memory is acceptable to be used for a server not to get stuck so to say.
While 400kb might not seem much, im thinking that if there are 100 users on the server at the same time, will the memory usage be 40mb?
Thanks in advance guys