Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The method `match_path_extname` is expensive. We know that if the name of the file on disk does not start with the same basename that we're looking for then it won't matter what extensions it's got. This check is pretty fast. On the example app https://github.com/nfm/sprockets-3.x-performance-regressions It reduced asset lookup from 15 seconds to 2.6 seconds. It's still not perfect but it's a 400% + speed increase in the case of looking for an asset in a huge directory. Related comment #84 (comment)
- Loading branch information