[wp-trac] [WordPress Trac] #25073: Heartbeat performance and API improvements

WordPress Trac noreply at wordpress.org
Wed Aug 21 19:17:24 UTC 2013


#25073: Heartbeat performance and API improvements
-------------------------+------------------------------
 Reporter:  evansolomon  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------------------

Comment (by azaozz):

 > ...keep breaks in switch statements even if they're not reachable? It
 aids clarity...

 Think so too, we do that in PHP in many places.

 Some notes on 25073.diff:

 - `Date.now()` [https://developer.mozilla.org/en-
 US/docs/Web/JavaScript/Reference/Global_Objects/Date/now doesn't work] in
 IE < 9.
 - Perhaps we can add public method to trigger a connection immediately/out
 of order but keep `wp.heartbeat.connect()` private. One of the main points
 of heartbeat is not to overwhelm the server with too many connections.
 That's why it has a queue, to aggregate the data before sending it. On the
 other hand it's tempting to use it as a "pure" transport, i.e. when the
 user clicks something, the result of the click is sent to the server
 immediately. However in many cases that "click" doesn't have to be send
 immediately, for example we can use heartbeat to save postbox positions
 and open/close state, number of columns on the Dashboard, etc. a bit
 later.
 - There is a (big)
 [http://core.trac.wordpress.org/attachment/ticket/23216/23216-heartbeat-
 cleanup.5.diff structural/cleanup patch] by @carldanley and
 [http://core.trac.wordpress.org/ticket/23216#comment:94 some discussion]
 on #23216. Several of the enhancements there are the same as in
 25073.diff.

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


More information about the wp-trac mailing list