> -----Original Message-----
> From: Daevid Vincent [mailto:dae...@daevid.com]
> Sent: Tuesday, September 03, 2013 4:03 PM
> To: php-general@lists.php.net
> Cc: 'Stuart Dallas'
> Subject: RE: [PHP] refernces, arrays, and why does it take up so much
> memory? [SOLVED]
> 
> > $this->tmp_results[$k]['g'] = explode('|', trim($this-
> > >tmp_results[$k]['genres'], '|'));
> 
> Maybe an option. I'll look into trim() the last "|" off the tmp_results in
a
> loop at the top. Not sure if changing the variable will have the same
effect
> as adding one does. Interesting to see...
 
Here are the results of that. Interesting changes. Overall it's a slight
improvement, but most significant on the middle one, so still a worthy
keeper. Odd that it wouldn't be improvement across the board though. PHP is
kookie.
 
        PAGE RENDERED IN 7.1903319358826 SECONDS
        MEMORY USED @START: 262,144 - @END: 27,000,832 = 26,738,688 BYTES
        MEMORY PEAK USAGE: 69,992,448 BYTES
 
        PAGE RENDERED IN 6.5189208984375 SECONDS
        MEMORY USED @START: 262,144 - @END: 42,729,472 = 42,467,328 BYTES
        MEMORY PEAK USAGE: 78,905,344 BYTES
 
        PAGE RENDERED IN 7.5954079627991 SECONDS
        MEMORY USED @START: 262,144 - @END: 50,331,648 = 50,069,504 BYTES
        MEMORY PEAK USAGE: 96,206,848 BYTES
 
Old.
 
        PAGE RENDERED IN 7.0466279983521 SECONDS
        MEMORY USED @START: 262,144 - @END: 26,738,688 = 26,476,544 BYTES
        MEMORY PEAK USAGE: 69,730,304 BYTES
 
        PAGE RENDERED IN 6.9327299594879 SECONDS
        MEMORY USED @START: 262,144 - @END: 53,739,520 = 53,477,376 BYTES
        MEMORY PEAK USAGE: 79,167,488 BYTES
 
        PAGE RENDERED IN 7.558168888092 SECONDS
        MEMORY USED @START: 262,144 - @END: 50,855,936 = 50,593,792 BYTES
        MEMORY PEAK USAGE: 96,206,848 BYTES
 

Reply via email to