node
node copied to clipboard
lib: make navigator properties lazy
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:
After: