[wp-trac] [WordPress Trac] #24958: Large number of revisions cause memory exhaustion
WordPress Trac
noreply at wordpress.org
Fri Aug 30 19:37:48 UTC 2013
#24958: Large number of revisions cause memory exhaustion
--------------------------+--------------------
Reporter: jshreve | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.6.1
Component: Revisions | Version:
Severity: normal | Resolution:
Keywords: |
--------------------------+--------------------
Changes (by nacin):
* milestone: Awaiting Review => 3.6.1
Comment:
wp_update_post() triggers save_post which calls wp_save_post_revision()
which calls wp_get_post_revisions() to get the last revision.
We should set up wp_get_post_revisions() to be able to request the last
non-autosave in a single query, rather than potentially loading all
revisions into memory. I almost did this in 3.6 for wp_get_post_autosave()
because it used to do a direct WP_Query for an autosave, and now it calls
wp_get_post_revisions(), which can be painful.
This should fix the issue of wp_update_post(). It won't fix the revisions
screen, which *does* have some failover if it takes too long (or too much
memory) to process all of the diffs, but it does still try to load all
revisions at once. We should place a limit on that actual query, say 200,
to force it to occur in chunks. Our JS will handle it automatically.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24958#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list