Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#16670 closed enhancement (duplicate)

More efficient default .htaccess rules

Reported by: g1smd's profile g1smd Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Rewrite Rules Keywords:
Focuses: Cc:


Potential three fold performance increase in rewrite processing, simply by restricting which URL requests result in very inefficient -f and -d "exists" checks being invoked. These checks never need to be invoked for image or stylesheet requests.

Discussed at:

Attachments (1)

wordpress.16670.patch (1.3 KB) - added by g1smd 13 years ago.
Patch for wp-includes/rewrite.php file

Download all attachments as: .zip

Change History (11)

13 years ago

Patch for wp-includes/rewrite.php file

#1 @scribu
13 years ago

  • Keywords has-patch added

#2 @sivel
13 years ago

  • Keywords close 2nd-opinion added

See #11884

Per the decision from that ticket I am suggesting that this be closed as wontfix.

#3 @g1smd
13 years ago

Without the restrictions added by this patch, the standard WP code literally beats the server hard drive to death. The typical serving of a single "page" invokes at least several dozen very slow and inefficient "exists" checks: two for every object (image, stylesheet, etc) so requested. These checks for disk-based-resources happen for URL requests that were never going to be rewritten to the index.php script anyway. In that case, the checks are not needed, and should be avoided. Without the proposed changes, medium and high traffic sites will have to purchase an early server upgrade.

Last edited 13 years ago by g1smd (previous) (diff)

#4 @scribu
13 years ago

  • Milestone Awaiting Review deleted
  • Summary changed from More efficient default rewrite rules to More efficient default .htaccess rules

The second part of your proposal seems to be already addressed in #11845.

So I'm just going to close this as a dup of #11884.

Feel free to continue the discussion there.

#5 @scribu
13 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

#6 @g1smd
13 years ago


Looks like I wasted an evening here.

#7 @nacin
13 years ago

I like the idea, but how many plugins would it break?

#8 @g1smd
13 years ago

That depends on whether the index.php file directly serves images and stylesheets.

#10 @sivel
13 years ago

  • Keywords has-patch close 2nd-opinion removed
  • Version 3.1 deleted
Note: See TracTickets for help on using tickets.