[wp-trac] [WordPress Trac] #14372: Option to load comments asynchronously, for speed

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 21 06:01:17 UTC 2010


#14372: Option to load comments asynchronously, for speed
-----------------------------+----------------------------------------------
 Reporter:  markjaquith      |       Owner:                 
     Type:  feature request  |      Status:  new            
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Comments         |     Version:                 
 Severity:  normal           |    Keywords:  google comments
-----------------------------+----------------------------------------------

Comment(by filosofo):

 Replying to [ticket:14372 markjaquith]:
 > The idea is to have an option to not deliver comments in the page's
 initial HTML request, but to load them with an asynchronous JavaScript
 call. This would cut down on page generation time, reduce page size, and
 make page content load and show up faster.

 Possibly.  It also means:
  * Two requests where there were one. (See #14374 ?)
  * Problems with whatever browsers aren't supporting that particular JS
  * Extra bandwidth to request the JS that wasn't needed before.
  * Comments that aren't indexed in search results.


 > This also allows caching plugins to avoid flushing the cache for that
 page when a new comment is approved. They'd only have to monitor for post
 content changes. This means more cache hits, which translates into a
 faster average page load.

 This could be addressed directly by the caching plugins. And you still
 have to flush the comments cache.  And because the comments are now
 separated from the rest of the page, there are more server requests and
 more cache-processing overhead.

 > This solution would need to handle comment permalink requests, and
 scroll to that comment once the comments were loaded. We'd also have to
 delay comment-related JS (like threading support) until the comments were
 loaded.

 All of which suggests lots of extra JS, or JS libraries, etc., that are
 best left to the discretion of the theme author.

 > Is this core? Can we do it without requiring explicit theme support?

 It sounds like something we should make easier for people to implement
 with plugins and themes, if they can't already:
  * Perhaps a front-end JSON response API for better JS queries of stuff
 like comments.
  * Improving comments query performance
  * Encouraging theme authors to standardize common page element IDs and /
 or theme action hooks, so plugins can more easily let JS replace elements.
  * Setting comment paging to a lower number of comments per page by
 default.

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


More information about the wp-trac mailing list