Re: Performance tuning

Splash Forums Rewrite Users Performance tuning Re: Performance tuning


Hey Guys,

Good news. I have spent a few hours seriously profiling Rewrite (using YourKit CPU tracing,) and my efforts have been extremely rewarding…

As I suspected, Join is not the cause of the performance issues. Most of the performance costs that I could find (believe it or not) were due to inefficient looping and iteration. (As it turns out, enhanced for loops are incredibly slow.)

I’ve also object-cached/lazy-loaded many of the values that are accessed repeatedly throughout rule evaluation (the decoded request path, the decoded query string, etc…) This was another significant performance gain.

I can now seriously report that if you notice any performance difference at all due to rewrite, it should be in the range of about 7.5ms/request. That’s 0.0075 seconds on my machine. So if that’s a bad performance overhead, then I don’t really know what to tell you. That’s pretty good for a ~100rule rule set doing some actually complex things :)

Attached is the screenshot of my performance results. The highlighted line is the class where work actually occurs within Rewrite. Measuring this method effectively measures everything Rewrite does (on the inbound side of the life-cycle.)