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

WordPress Trac noreply at wordpress.org
Tue Nov 3 20:08:59 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 needs-testing                         |  Resolution:
                                                 |     Focuses:
-------------------------------------------------+-------------------------
Changes (by adamsilverstein):

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


Comment:

 Replying to [comment:10 miqrogroove]:
 > Looks like a great improvement.  Just a couple style ideas:

 Thanks for the feedback.  I addressed these points in my latest patch.

 I wasn't sure about the COUNT(1) code, I think I saw that elsewhere in
 core and my brief research I found
 [http://laurentschneider.com/wordpress/2008/08/what-is-faster-select-
 count-or-select-countpk.html one post] that seemed to indicate the (1)
 form might be faster; however I'm more familiar with (*) and didn’t detect
 any change in performance with either form so sticking with your
 suggestion.

 In [attachment:34560.3.diff]

 * Add a new `wp_get_post_revisions_details` function so we can get only
 the details we need to build the revisions list for the post page without
 making any backwards compatible breaking changes to
 `wp_get_post_revisions` - appreciate feedback on query and approach here
 * In my testing with this patch in place, my heavy revision edit post page
 went from using ~108MB to using ~ 64MB of memory, a 40% reduction.

 Query Monitor details before and after:

 before:
 [[Image(http://cl.ly/image/0D1i2A3b0725/Edit_Post__This_is_nice__WordPress_2015-11-03_13-04-51.jpg)]]


 after:
 [[Image(http://cl.ly/image/2E133G470k2j/Edit_Post__This_is_nice__WordPress_2015-11-03_13-04-15.jpg)]]

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


More information about the wp-trac mailing list