Confirmed users
920
edits
LesOrchard (talk | contribs) No edit summary |
LesOrchard (talk | contribs) No edit summary |
||
| Line 11: | Line 11: | ||
** AMO Bandwagon feed working, lessons learned: | ** AMO Bandwagon feed working, lessons learned: | ||
*** Problem: | *** Problem: | ||
**** Models yield | **** Models yield truckloads of deeply nested arrays, even with unbindFully() | ||
**** Sanitizing is heavily recursive | **** 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. | ||