[buddypress-trac] [BuddyPress Trac] #9061: Rewrite Rules Built Even When Not Needed

buddypress-trac noreply at wordpress.org
Tue Jan 9 15:02:24 UTC 2024


#9061: Rewrite Rules Built Even When Not Needed
-------------------------+------------------------------
 Reporter:  sjregan      |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Core         |     Version:  12.0.0
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by sjregan):

 > Is it an issue that each time a page load all possible registered post
 types are setting their rewrite rules ?

 I think so :)

 What I am trying to understand is:

 1. What is the point of WP writing the rewrite rules to the database, when
 the rewrite rules are calculated and stored in memory every single request
 regardless of whether the rewrite rules are in the already in the database
 at the start of the request?

 2. Whether it is a good idea to spend CPU cycles calculating values that
 are never used during the request and thrown away at the end of the
 request?

 3. Whether there is any interest or value in changing the way BP sets the
 rewrite rules to avoid unnecessary calculations, in order to keep request
 overheads as low as possible?

 4. If I want to avoid my plugin unnecessarily slowing down page requests,
 is it more performant to use the same approach as BP or to instead use the
 `generate_rewrite_rules` action and/or the `rewrite_rules_array` filter?

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/9061#comment:6>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list