Reorganize rewrite_rules into a tree of strings and patterns
|Reported by:||andy||Owned by:|
At WordCamp San Francisco 2011 (WCSF2011) we discussed optimizing wp::parse_request by converting the flat array of rewrite_rules into a tree by inspecting common prefixes. The proof-of-concept code performed on average about 1ms faster per parse_request. Core team decided to shelve the idea as the added complexity is hard to justify with a 1-2% speed improvement.
The attached patch is a snapshot of the code as it stood on my wordpress.com sandbox during speed testing. The script treetest.php was run from wpsh.