Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup: address comment
  • Loading branch information
BridgeAR committed Sep 8, 2018
commit 8742df1b3e54b43390583f88561636948a07d0ca
8 changes: 4 additions & 4 deletions doc/api/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -536,10 +536,10 @@ console.log(inspect(weakSet, { showHidden: true }));
```

Please note that `util.inspect()` is a synchronous method that is mainly
intended as a debugging tool. It's maximum output length is limited to 128 MB
and input values that result in output bigger than that will not be inspected
fully. Such values can have a significant performance overhead that can block
the event loop for a significant amount of time.
intended as a debugging tool. Its maximum output length is limited to 128 MB and
input values that result in output bigger than that will not be inspected fully.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☝️ Since this is a heuristic is it approximately 128 mb or exactly?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be detected by the very first entry that exceeds that limit (but only after being fully inspected at that level).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And that is also not exact as the higher levels could already contain data that will be added on top of that. It is fairly precise if the individual properties on the object are not that big. If each of them is huge, the limit will not be as exact.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the wording be tweaked to qualify it as "approximately 128 MB"?

Such values can have a significant performance overhead that can block the event
loop for a significant amount of time.

### Customizing `util.inspect` colors

Expand Down