ets-berkeley-edu/nakamura — comment on commit 443101046e61c41f24327500f3601a988392d83c
File:  line 0
By ieb:

The reason I did not resolve the mapped resource path invoking the ResourceResolver was to avoid going through the resource resolution process for all requests, adding ms to each request. Using a simple string match was able to reject invalid and accept valid urls early in the request cycle minimising the cost of resource resolution. The node lookup was a subsequent patch to minimise configuration, although it would have been better not to have that step.
There is nothing wrong with the patch and it doesn't require as much configuration (which is good), but it undoes a few hours of work spent with a profiler optimising this section of the code.

Obviously, optimization is irrelevant if you have the hardware budget, YMMV