Webdev:Meetings:2008-12-23: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 11: Line 11:
** AMO Bandwagon feed working, lessons learned:
** AMO Bandwagon feed working, lessons learned:
*** Problem:
*** Problem:
**** Models yield lots of deeply nested arrays, even with lots of unbinding
**** Models yield truckloads of deeply nested arrays, even with unbindFully()
**** Sanitizing is heavily recursive with deeply nested arrays, is slow, and appears to tickle PHP-level memory leaks.
**** Sanitizing is heavily recursive, slow, and appears to tickle PHP-level memory leaks with is_array() and other functions.
**** This combination lead to an inability to build the feed in under 90 seconds and 64mb of RAM.  Since php.ini limits to 30 seconds and 16MB, this is fail.
**** This combination lead to an inability to build the feed in under 90 seconds and 64mb of RAM.   
***** The function was called 1M times before optimization, and 50K after, still leaked memory like a sieve (12MB before first call, 64MB after last).
***** Since php.ini limits to 30 seconds and 16MB, this is fail.
*** Solution:  
*** Solution:  
**** Never feed Model result arrays straight into sanitizing.   
**** Never feed Model result arrays straight into sanitizing.   
Confirmed users
920

edits

Navigation menu