Re: Performance tuning

Splash Forums Rewrite Users Performance tuning Re: Performance tuning


Preliminary tests using Join.simple() are improved, but not stunning.

While this execution seemed to report longer times spent in HttpRewriteProvider.rewrite() – at 35%, which could simply mean that the server was more efficient at actually handling the response internals on this execution – the average time spent per request was actually down from 7.4ms to 6.35ms per request. That's a performance gain of 0.001 ms/request, so I'm not really sure that the gain is worth the additional programming complexity, as I said, most of the performance was actually being lost due to inefficient loop iteration, and it seems like I've eliminated most of that.

Just to be clear, that is 1/1000 of a second.

Keep in mind that once a regular expression Pattern object is compiled, they are extremely efficient, so that is why this change is not resulting in a more significant performance gain. Compiled Patterns are stored in each ParameterizedPattern object once initialized, and these patterns are object-cached in the rules and conditions themselves.

String matching *is* faster, but not by much for the type of work being done here. Thoughts welcome. Screenshot of results attached.