Webdev:Meetings:2008-12-23

From MozillaWiki
Jump to: navigation, search
  • laura
    • SUMO release OMG.
  • lars
    • finished initial coding of perfomatic's new collector w/ unit tests
    • wrote a quickie for chofmann to get urls from uuids
  • rdoherty
    • Community Store push last week
    • Rewriting Graph server javascript code
  • lorchard
    • LizardFeeder launch attempt, still pending
    • AMO Bandwagon feed working, lessons learned:
      • Problem:
        • Models yield truckloads of deeply nested arrays, even with unbindFully()
        • 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.
          • 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 our php.ini limits to 30 seconds and 16MB, this is fail. (Never mind that it's insane on the face of it.)
      • Solution:
        • Never feed Model result arrays straight into sanitizing.
        • Build an intermediate array, as flat as possible, with only the minimal amount of data necessary for the View.
        • This reduces both the recursion and work sanitizing needs do to in general.
      • Bonus:
        • Learned all about using XDebug with 650MB cachegrind files, which don't work in webgrind and require KCachegrind or WinCachegrind to view.
        • Turning on function tracing (separate from profiling) offers a peek at memory usage from call to call.
        • Even with memcache available, CakePHP adds 100000's of function calls of overhead, for what it's worth.