Skip to content

Commit 9e8b1b3

Browse files
BridgeARjasnell
authored andcommitted
util: refactor inspect for performance and more
The main optimizations are - Removed visibleKeys - Removed proxy cache - Removed Object.assign - No key concatenating anymore - No key recalculating anymore - Improved indentation logic - Improved string escape logic - Added many fast paths - Optimized code branches a lot - Optimized (boxed) primitive handling - Inline code if possible - Only check extra keys if necessary - Guard against unnecessary more expensive calls This also fixes a bug with special array number keys as e.g. "00". Besides that there were lots of smaller optimizations, the code got a bit cleaned up and a few more tests got in. PR-URL: #14881 Fixes: #15288 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
1 parent 0f8f37e commit 9e8b1b3

File tree

4 files changed

+558
-505
lines changed

4 files changed

+558
-505
lines changed

0 commit comments

Comments
 (0)