[wp-trac] [WordPress Trac] #52992: REST API: Avoid unnecessarily preparing item links

WordPress Trac noreply at wordpress.org
Sun Jun 26 01:41:32 UTC 2022


#52992: REST API: Avoid unnecessarily preparing item links
-------------------------------------------------+-------------------------
 Reporter:  dlh                                  |       Owner:
                                                 |  rachelbaker
     Type:  enhancement                          |      Status:  accepted
 Priority:  normal                               |   Milestone:  6.1
Component:  REST API                             |     Version:  4.7
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-      |     Focuses:
  testing needs-testing-info                     |  performance
-------------------------------------------------+-------------------------

Comment (by dlh):

 @spacedmonkey A few updates:

 * I've opened https://github.com/WordPress/wordpress-develop/pull/2883
 with changes that you had originally suggested in the context of this
 ticket and that are now covered by tickets #56019 and #56020.

 * I closed my previous PR for this ticket and opened a new one with a
 refreshed patch: https://github.com/WordPress/wordpress-develop/pull/2884.
 The second PR is based on the first, so it includes the same changes.

 * Regarding performance, the PHPBench benchmarking class that I used
 before now reports around a 50% decrease in wall time with the patch
 applied, compared to a 60% decrease when this ticket was reviewed last
 fall.

 {{{
 +-----------------------+-------------------+-----+------+-----+-----------------+-----------------+----------------+
 | benchmark             | subject           | set | revs | its | mem_peak
 | mode            | rstdev         |
 +-----------------------+-------------------+-----+------+-----+-----------------+-----------------+----------------+
 | RestPrepareLinksBench | bench_default     |     | 1000 | 5   | 27.265mb
 -1.02% | 1.473ms -54.02% | ±3.44% -19.93% |
 | RestPrepareLinksBench | bench_with_filter |     | 1000 | 5   | 27.268mb
 -1.02% | 1.452ms -56.60% | ±1.31% -9.83%  |
 +-----------------------+-------------------+-----+------+-----+-----------------+-----------------+----------------+
 }}}

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


More information about the wp-trac mailing list