Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Memoize absolute_url and relative_url filters
These two filters are quite slow, as Addressable::URI.parse is quite slow. Fortunately, they are pure functions and so can be easily memoized. This one change shaves 8s off the CockroachDB docs build (github.com/cockroachdb/docs).
- Loading branch information
Showing
1 changed file
with
30 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters