[wp-trac] [WordPress Trac] #24425: Revisions cleanup

WordPress Trac noreply at wordpress.org
Tue Jul 9 05:42:28 UTC 2013


#24425: Revisions cleanup
----------------------------+--------------------
 Reporter:  markjaquith     |       Owner:
     Type:  task (blessed)  |      Status:  new
 Priority:  high            |   Milestone:  3.6
Component:  Revisions       |     Version:  trunk
 Severity:  blocker         |  Resolution:
 Keywords:                  |
----------------------------+--------------------

Comment (by markjaquith):

 What I'd like for on-demand loading (say, in compare-two mode, or for fast
 scrubbers in single mode):

 A way to call `ensure` (a flag?) that says "I can wait for this". If that
 flag is set, requests are queued and then a debouncer coalesces them and
 passes them to `load` all together. It'll have to be based on
 `$.Deferred`, because `ensure` has to return a promise. Since we don't
 have a "collecting" debouncer, I was thinking about just maintaining a
 queue object with keys of diff IDs and values of a deferred object (they
 can all point to the same one). Then we can just have a dummy debouncer
 that just serves as a triggering device. When it goes off, we grab the
 queued ones, clear the queue, add them to the request, then iterate their
 deferreds, setting them to resolve when the `load` deferred does.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24425#comment:30>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list