Unverified Commit 5a13e660 authored by Ruben Bridgewater's avatar Ruben Bridgewater Committed by Michaël Zasso
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.

Backport-PR-URL: https://github.com/nodejs/node/pull/23039
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 90bbab6f
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