[wp-trac] [WordPress Trac] #11884: mod_rewrite optimization

WordPress Trac wp-trac at lists.automattic.com
Thu Mar 10 21:16:41 UTC 2011


#11884: mod_rewrite optimization
-------------------------------+-----------------------
 Reporter:  Denis-de-Bernardy  |       Owner:
     Type:  enhancement        |      Status:  reopened
 Priority:  normal             |   Milestone:
Component:  Optimization       |     Version:  3.0
 Severity:  normal             |  Resolution:
 Keywords:  close 2nd-opinion  |
-------------------------------+-----------------------

Comment (by jvleis):

 I believe I now understand the reason for our different perspectives.
 Replying to [comment:15 sivel]:
 > The real concern here is that WordPress should be as least restrictive
 as possible, and adding these rules defeats that.

 Sorry, but I do not see how.

 > In addition, if we begin adding excludes here, to what end do we do so?
 There are hundreds of thousands of file types that people are going to
 want excluded.  I personally have the following list that I use for
 caching purposes that is pulled from the allowed list of mime types that
 WP uses for uploads plus some extras and minus a few:
 >
 > {{{
 >
 jpg|jpeg|jpe|gif|png|bmp|tif|tiff|ico|asf|asx|wax|wmv|wmx|avi|divx|flv|mov|qt|mpeg|mpg|mpe|txt|asc|c|cc|h|csv|tsv|rtx|css|mp3|m4a|m4b|mp4|m4v|ra|ram|wav|ogg|oga|ogv|mid|midi|wma|mka|mkv|rtf|js|pdf|doc|docx|pot|pps|ppt|pptx|ppam|pptm|sldm|ppsm|potm|wri|xla|xls|xlsx|xlt|xlw|xlam|xlsb|xlsm|xltm|mdb|mpp|docm|dotm|pptx|sldx|ppsx|potx|xlsx|xltx|docx|dotx|onetoc|onetoc2|onetmp|onepkg|swf|class|tar|zip|gz|gzip|exe|odt|odp|ods|odg|odc|odb|odf|wp|wpd|diff|patch|sh|conf|xsl|bz2|dv
 > }}}
 >
 > That totals 110 file types.
 >

 jpg|jpe?g|gif|png|css|js
 What percentage of files would you estimate I have just described? Would
 it be 3 standard deviations?  The rest don't matter, and their sheer
 number yields an increasingly lower return on web page load times, which
 defeats the goal.

 > Then we start telling people, no we wont add that file extension, we
 then make it easier to add them via a filter, at which point removing
 those lines via a plugin can become more problematic using the
 mod_rewrite_rules filter.

 See the earlier point.  You would be quibbling over nothing since you are
 already covering 99% of all occurrences with 6 files.  You would only
 change the default setting when adding a file extension is required to
 remain above 3 standard deviations.

 But I suspect there is another issue here.  You appear to be saying that
 the more 'dense' code would increase programming requests.  This is a
 common error by programmers; measuring code utility by the requests it
 inspires (how much work it makes for the programmer) as opposed to the
 utility to the customer.

 Let us look at that utility. Let's say there are 4M self-hosted WP sites.
 If the code reduces hosting loads by 20%, that is a conservative saving of
 $8-12M / month (not to mention the unquantified benefit of speed=fun on
 the Internet).  Notice that the saving is divided between the hosting firm
 and their customers.  IOW, lower loads means higher capacity for servers.
 Customers only enjoy the savings when it delays upgrades.

 >
 > As another data point, afaik Drupal still uses basically the same rules
 we do.

 Joomla and Drupal are considering it.  But ultimately, why is that
 pertinent?

 >
 > Working at a hosting company, one that hosts quite a lot of WP sites, I
 have never seen these rewrites cause issues.  For those people who are
 concerned with performance in this aspect, you wouldn't want to have
 .htaccess files enabled anyway, and would be placing this in your vhost
 configuration, in which case you can do whatever you want since WordPress
 isn't managing your mod_rewrite rules.
 >
 As in your previous post, I believe you are arguing that millions of WP
 users uninterested in learning code are free to spend their precious time
 getting to know htaccess rules.  Since the slower, 'simpler' code works,
 we should keep it.  Do I have that right?  If so, I urge you to consider
 whether you mean it.

 WP is great open source software.  I have no idea how you folks figure out
 what to program.  I just wanted you to be aware that there are enormous
 dollar values being spent by real people when you choose to save
 programming code.

 Thank you for your time.  The decisions, as always, are up to the WP team.
 Good luck.

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


More information about the wp-trac mailing list