Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I wrote a simple benchmarking script: import * as helmet from "./index.ts"; console.time("getting"); for (let i = 0; i < 1_000_000; i++) { helmet.contentSecurityPolicy.getDefaultDirectives(); } console.timeEnd("getting"); On my machine, this took about 4.5 seconds before the change. Now, it averages about 32 milliseconds.
- Loading branch information