Unverified Commit 12ed7c94 authored by Ruben Bridgewater's avatar Ruben Bridgewater
Browse files

util: improve inspect performance

This significantly improves the inspection performance for all array
types. From now on only the visible elements cause work instead of
having to process all array keys no matter how many entries are
visible.

This also moves some code out of the main function to reduce the
overall function complexity.

PR-URL: https://github.com/nodejs/node/pull/22503


Reviewed-By: default avatarMatteo Collina <matteo.collina@gmail.com>
Reviewed-By: default avatarJohn-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarRefael Ackermann <refack@gmail.com>
parent de33a5aa
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment