[Mahara-contributors] [Bug 1132370] A change has been merged
Reviewed: https://reviews.mahara.org/2310 Committed: http://gitorious.org/mahara/mahara/commit/2ba43bfddda3959b42f85bf6bf66c5b309399471 Submitter: Robert Lyon (robe...@catalyst.net.nz) Branch:1.6_STABLE commit 2ba43bfddda3959b42f85bf6bf66c5b309399471 Author: Aaron Wells aar...@catalyst.net.nz Date: Sun Feb 24 21:17:07 2013 +1300 Bug #1132370 Remove create_function() from dml.php to save memory Functions created by create_function() don't ever get deallocated, which contributes to scripts running out of memory. Change-Id: Ifd78bf05bab67a9b1593a7d9722dd2433e7ad7ca Signed-off-by: Aaron Wells aar...@catalyst.net.nz -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contrib members https://bugs.launchpad.net/bugs/1132370 Title: Remove create_function() from dml.php to save memory Status in Mahara ePortfolio: Fix Released Status in Mahara 1.5 series: In Progress Status in Mahara 1.6 series: Fix Committed Bug description: While trying to optimize memory usage in the mahara.org cron jobs (which keep crashing due to running out of memory), I noticed from the error stacks that it kept crashing on the call to create_function() in db_quote_table_placeholders() in dml.php The reason for this, is because functions created by create_function() are never garbage collected. They persist for the lifetime of the script's execution. Which means that if you put it inside a loop that gets called thousands of times, it keeps using up more and more memory with new copies of the function, until the script crashes from running out of RAM. There are about a dozen other usages of create_function() in Mahara's codebase, but this is the only one that's likely to be used in a large loop. To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1132370/+subscriptions ___ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp
[Mahara-contributors] [Bug 1132370] A change has been merged
Reviewed: https://reviews.mahara.org/2309 Committed: http://gitorious.org/mahara/mahara/commit/2e0c66c0e13f9267ecabee2f15273ca48c872e0d Submitter: Robert Lyon (robe...@catalyst.net.nz) Branch:1.5_STABLE commit 2e0c66c0e13f9267ecabee2f15273ca48c872e0d Author: Aaron Wells aar...@catalyst.net.nz Date: Sun Feb 24 21:17:07 2013 +1300 Bug #1132370 Remove create_function() from dml.php to save memory Functions created by create_function() don't ever get deallocated, which contributes to scripts running out of memory. Change-Id: Ifd78bf05bab67a9b1593a7d9722dd2433e7ad7ca Signed-off-by: Aaron Wells aar...@catalyst.net.nz -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contrib members https://bugs.launchpad.net/bugs/1132370 Title: Remove create_function() from dml.php to save memory Status in Mahara ePortfolio: Fix Released Status in Mahara 1.5 series: Fix Committed Status in Mahara 1.6 series: Fix Committed Bug description: While trying to optimize memory usage in the mahara.org cron jobs (which keep crashing due to running out of memory), I noticed from the error stacks that it kept crashing on the call to create_function() in db_quote_table_placeholders() in dml.php The reason for this, is because functions created by create_function() are never garbage collected. They persist for the lifetime of the script's execution. Which means that if you put it inside a loop that gets called thousands of times, it keeps using up more and more memory with new copies of the function, until the script crashes from running out of RAM. There are about a dozen other usages of create_function() in Mahara's codebase, but this is the only one that's likely to be used in a large loop. To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1132370/+subscriptions ___ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp