[wp-trac] [WordPress Trac] #28425: get_permalink passes only post ID to called functions instead of post object

WordPress Trac noreply at wordpress.org
Wed Jun 25 14:52:22 UTC 2014


#28425: get_permalink passes only post ID to called functions instead of post
object
-------------------------------------------+--------------------------
 Reporter:  arnee                          |       Owner:
     Type:  enhancement                    |      Status:  new
 Priority:  normal                         |   Milestone:  4.0
Component:  Posts, Post Types              |     Version:  trunk
 Severity:  normal                         |  Resolution:
 Keywords:  has-patch dev-feedback commit  |     Focuses:  performance
-------------------------------------------+--------------------------

Comment (by kovshenin):

 Replying to [comment:19 SergeyBiryukov]: You're right, 100k yielded more
 consistent results and there indeed is a ~ 5-15% performance increase.
 Here's the last run: https://cloudup.com/ifbVpepbkSP on PHP 5.6.

 Should we look for other places that could benefit from a similar change?
 Perhaps worth a new ticket? A quick search revealed:

 * clean_post_cache() in wp_publish_post
 * get_the_guid() in wp_get_attachment_url() and _transition_post_status()
 * wp_get_post_revisions() in wp_list_post_revisions()
 * get_attachment_link() in wp_get_attachment_link()

 P.S. You, sir, must have a very fast computer to have those executed in 12
 seconds ;)

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


More information about the wp-trac mailing list