[wp-trac] Re: [WordPress Trac] #8958: Huge amount rewrite rules for page revisions after upgrade

WordPress Trac wp-trac at lists.automattic.com
Thu May 28 10:28:13 GMT 2009


#8958: Huge amount rewrite rules for page revisions after upgrade
--------------------------+-------------------------------------------------
 Reporter:  matthijs      |       Owner:  Denis-de-Bernardy
     Type:  defect (bug)  |      Status:  accepted         
 Priority:  normal        |   Milestone:  Future Release   
Component:  Optimization  |     Version:  2.7              
 Severity:  major         |    Keywords:  has-patch tested 
--------------------------+-------------------------------------------------
Changes (by Denis-de-Bernardy):

  * keywords:  has-patch needs-testing => has-patch tested
  * owner:  ryan => Denis-de-Bernardy
  * status:  new => accepted
  * component:  Permalinks => Optimization


Comment:

 Replying to [comment:22 onezero]:
 > The original situation was the custom permalink setting
 "/%category%/%year%/%postname%", the result of the query was +/- 1.400.000
 chars. After applying patch 8958.diff the result was +/- 1.400.000 chars.
 After applying patch reduce_attach_query.8958.diff the result was +/-
 145.000 chars. A significant difference.

 Yes, but you're missing the point. If anything, you've just highlighted
 that 8958.diff has no bugs, as opposed to reduce_attach_query.8958.diff.
 The question here is not reduce the amount of rewrite rules, but rather to
 make sure that they're generated more quickly.

 Re the number of rules, it cannot be trimmed because you're using a
 permalink structure that requires verbose page rewrite rules.

 > Following the hint of justinph (see above) to use a fixed prefix
 ("/list/%category%/%year%/%postname%") the result in the original
 (unpatched) situation is +/- 8.000 chars. An even more dramatic
 improvement than the results achieved by the fixes, but at a cost:
 (slightly) different URLs. An equal result was achieved by moving a less
 variable parameter to the front of the setting:
 "/%year%/%category%/%postname%"): +/- 7.500 chars.

 FYI, this prefix trick should no longer work in 2.8 beta-2. And as you
 highlight, the rule that starts with /%year%/ is the best -- precisely
 because it's no longer using verbose page rewrite rules.

 Anyway, marking 8958.diff as tested, since it significantly reduces the
 number of queries needed to generate those rules.

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


More information about the wp-trac mailing list