Hi guys I'm trying to optimize my application here and have started to benchmark snippets of code as to how much memory they are taking up. I just discovered that a single include statement is taking up to 1.5MB of memory. I'm using memory_get_usage() to check for memory used before adn after a snippet of code.
The file included includes just one file but if I try to include that nested include file on my own the maximum reduction is just 768KB for one include. The files are really small here and the only code in the files are class definitions.
What is happening here is this normal? And how can I resolve this strain. My application is hosted on a shared host and I'm wondering if this may be the cause of my application dying out so much.
EDIT:
This is how I am benchmarking:
$m = memory_get_usage(true);
include('/...');
$m = memory_get_usage(true)-$m;
echo $m;//over 1.5 MB ?