WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #12935, comment 63


Ignore:
Timestamp:
02/23/11 13:51:20 (5 years ago)
Author:
scribu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12935, comment 63

    v1 v2  
    11Replying to [comment:62 mikeschinkel]: 
    22> Replying to [comment:60 scribu]: 
    3 > > But the perceived lack of flexibility of WP_Rewrite isn't due to regexes, but due to the way these patterns are generated and stored. 
    4 >  
    5 > You misquote me.  It's not a lack of flexibility of regular expressions; it's the requirement to match each URL in it's entirety that makes it very difficult for most people to set URL routes for anything beyond trivial. 
     3> > But the perceived lack of flexibility of WP_Rewrite isn't due to regexes, but due to the way these patterns are generated and stored. 
     4>  
     5> You misquote me.  It's not a lack of flexibility of regular expressions; it's the requirement to match each URL in it's entirety that makes it very difficult for most people to set URL routes for anything beyond trivial. 
    66 
    77I didn't quote you to begin with. 
    88 
    9 > Also, can you help me understand why you'd advocate maintaining a system that generates and map upwards of 1000 regular expresssions for a complex CMS when with a tree structure the matching would be 1 to 2 orders of magnitude less per page load? 
     9[[BR]] 
     10 
     11> Also, can you help me understand why you'd advocate maintaining a system that generates and map upwards of 1000 regular expresssions for a complex CMS when with a tree structure the matching would be 1 to 2 orders of magnitude less per page load? 
    1012 
    1113I advocate maitaining this system for normal use. Complex CMSs can do tree structure matching, as needed. 
    1214 
    13 > And please address why retaining the complexity of the regular expressions as used in the rewrite system makes sense vs. much more straightforward simple match rules that mere mortals are much more likely to understand (with fallback to RegEx, of course?) 
     15[[BR]] 
     16 
     17> And please address why retaining the complexity of the regular expressions as used in the rewrite system makes sense vs. much more straightforward simple match rules that mere mortals are much more likely to understand (with fallback to RegEx, of course?) 
    1418 
    1519The system you propose is not actually that simple at all. You just replace the regex engine with PHP code, removing one common skillset with a very specific one (knowing the tree structure API and algorithm).