node icon indicating copy to clipboard operation
node copied to clipboard

lib: make navigator properties lazy

Open jasnell opened this issue 8 months ago • 1 comments

Noticed in some benchmarking/profiling that the Navigator object constructor was rather expensive and slow due to initialization of properties during construction. It makes more sense for these to be lazily initialized on first access.

Flamegraphs... of `node -pe "navigator"

Before: image

After: image

jasnell avatar Jun 30 '24 07:06 jasnell