[wp-trac] [WordPress Trac] #34560: Server error after saving many revisions

WordPress Trac noreply at wordpress.org
Tue Nov 3 18:59:49 UTC 2015


#34560: Server error after saving many revisions
-------------------------------------------------+-------------------------
 Reporter:  pdfernhout                           |       Owner:
     Type:  defect (bug)                         |  adamsilverstein
 Priority:  normal                               |      Status:  assigned
Component:  Editor                               |   Milestone:  Future
 Severity:  major                                |  Release
 Keywords:  needs-unit-tests has-patch dev-      |     Version:  3.6
  feedback                                       |  Resolution:
                                                 |     Focuses:
-------------------------------------------------+-------------------------
Changes (by adamsilverstein):

 * keywords:  needs-patch needs-unit-tests => needs-unit-tests has-patch
     dev-feedback


Comment:

 I modified used Ocean90's [https://gist.github.com/ocean90/5586293 script]
 to create a post with hundreds of large revisions and the high memory
 usage is pretty apparent.

 [attachment:34560.diff] Is an initial attempt at a fix, updating the count
 and link to last revision in the publish box in `edit-form-advanced.php`
 referenced in the ticket description. This does help memory usage
 significantly, however I think I can improve it even further by tackling
 the revisions list meta box.

 In [attachment:34560.diff]:

 * Add two new helper methods `wp_get_post_revision_count` and
 `wp_get_last_revision_id` that do what you would expect.
 * Use new helpers in `edit-form-advanced.php`

 Testing & feedback appreciated.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34560#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list