-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
performanceIssues and PRs related to the performance of Node.js.Issues and PRs related to the performance of Node.js.utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.
Description
- Version: 8.2.1
- Platform: macOS
- Subsystem: util
- Open the REPL
- Enter
Array(100000000)
After about 15 seconds, [ <100000000 empty items> ]
is printed.
In contrast, entering the same thing into the Chrome devtools console results in an output almost immediately.
It looks like this happens because util.inspect
iterates from 0 to array.length
. It might be better to iterate over Object.keys(array)
instead.
Metadata
Metadata
Assignees
Labels
performanceIssues and PRs related to the performance of Node.js.Issues and PRs related to the performance of Node.js.utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.