Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#24388 closed defect (bug) (invalid)

Optimize revisions diff loading - especially when many revisions

Reported by: adamsilverstein's profile adamsilverstein Owned by:
Milestone: Priority: normal
Severity: critical Version: 3.6
Component: Revisions Keywords:
Focuses: Cc:

Description

Currently viewing the revisions page chokes the browser when there are many revisions (say over 50) - even with a lower number the browser seems overwhelmed by the numerous ajax requests fired to load the comparison diffs.

  • limit the number of simultaneous ajax requests
  • group diff requests to optimize loading and limit total number of calls when there are many revisions
  • caching for diff calculations

Attachments (4)

24388.diff (7.3 KB) - added by adamsilverstein 11 years ago.
24388.2.diff (7.3 KB) - added by adamsilverstein 11 years ago.
24388.3.diff (7.3 KB) - added by adamsilverstein 11 years ago.
24388.4.diff (7.3 KB) - added by adamsilverstein 11 years ago.

Download all attachments as: .zip

Change History (12)

#1 @SergeyBiryukov
11 years ago

  • Milestone changed from Awaiting Review to 3.6
  • Version set to trunk

#3 follow-up: @kirasong
11 years ago

This is important, since using the browser's limit of 8-10 connections is more than we should be making in parallel to most shared hosts.

We don't want loading revisions to potentially make the user's site stop loading for guests.

#4 follow-up: @nacin
11 years ago

  • Severity changed from normal to critical

Why are we doing each diff as a single ajax request? That seems very wrong.

#5 in reply to: ↑ 4 @adamsilverstein
11 years ago

Replying to nacin:

Why are we doing each diff as a single ajax request? That seems very wrong.

working on grouping requests...

idea is to load diffs asynchronously - initial code had all diffs loading with a single initial ajax requests, however this can take a while to calculate, especially if there are many diffs or there are lots of changes. if all diffs are calculated at load, there could be a long delay before the page displays at all. the idea is to allow user interaction while the diffs are calculated/loaded - hence the individual requests.

new patch (coming soon) limits concurrent ajax requests, a second will group requests when there are many revisions to limit the total number of requests made by the page.

#6 in reply to: ↑ 3 @adamsilverstein
11 years ago

Replying to DH-Shredder:

This is important, since using the browser's limit of 8-10 connections is more than we should be making in parallel to most shared hosts.

We don't want loading revisions to potentially make the user's site stop loading for guests.

will have patches for this today.

#7 @adamsilverstein
11 years ago

  • Keywords dev-feedback added

24388.4.diff​:

  • limit concurrent ajax requests (currently set to 3)
  • don't refresh all tickmarks on each model load (causing heavy cpu load)
  • grouping requests next

#8 @ocean90
11 years ago

  • Keywords needs-patch dev-feedback removed
  • Milestone 3.6 deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.