Skip to content

console,util: improve array inspection performance - #60037

Closed
BridgeAR wants to merge 1 commit into
nodejs:mainfrom
BridgeAR:BridgeAR/2025-09-27-improve-array-inspection-performance
Closed

console,util: improve array inspection performance#60037
BridgeAR wants to merge 1 commit into
nodejs:mainfrom
BridgeAR:BridgeAR/2025-09-27-improve-array-inspection-performance

Conversation

@BridgeAR

@BridgeARBridgeAR commented Sep 27, 2025

Copy link
Copy Markdown
Member

There is no need to do the own property check, since the descriptor is needed right afterwards anyway.

 confidence improvement accuracy (*) (**) (***)
util/inspect-array.js type='denseArray_showHidden' len=100 n=5000 *** 2.61 % ±1.50% ±1.99% ±2.59%
util/inspect-array.js type='denseArray' len=100 n=5000 *** 3.38 % ±1.24% ±1.66% ±2.16%
util/inspect.js option='colors' method='Array' n=80000 *** 1.99 % ±0.49% ±0.65% ±0.85%
util/inspect.js option='none' method='Array' n=80000 *** 5.64 % ±0.59% ±0.79% ±1.02%
util/inspect.js option='showHidden' method='Array' n=80000 *** 3.81 % ±0.50% ±0.67% ±0.87%

There is no need to do the own property check, since the descriptor
is needed right afterwards anyway.
@BridgeARBridgeAR added util Issues and PRs related to the built-in util module. console Issues and PRs related to the console subsystem. performance Issues and PRs related to the performance of Node.js. labels Sep 27, 2025
@nodejs-github-botnodejs-github-bot added the needs-ci PRs that need a full CI run. label Sep 27, 2025
@BridgeAR

Copy link
Copy Markdown
MemberAuthor

@jasnelljasnell added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 27, 2025
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 27, 2025
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@codecov

codecovBot commented Sep 27, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.47%. Comparing base (f6ea5bf) to head (98f4a1c).
⚠️ Report is 66 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #60037 +/- ##
==========================================
+ Coverage 88.28% 88.47% +0.19% 
==========================================
Files 702 703 +1 Lines 206995 207547 +552 Branches 39833 40009 +176 ==========================================
+ Hits 182740 183633 +893 + Misses 16265 15903 -362 - Partials 7990 8011 +21 
Files with missing linesCoverage Δ
lib/internal/util/inspect.js99.93% <100.00%> (+<0.01%)⬆️

... and 100 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@BridgeARBridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 28, 2025
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

addaleax pushed a commit that referenced this pull request Sep 30, 2025
There is no need to do the own property check, since the descriptor
is needed right afterwards anyway.
PR-URL: #60037
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
@addaleax

Copy link
Copy Markdown
Member

Landed in c2536ad

targos pushed a commit that referenced this pull request Oct 6, 2025
There is no need to do the own property check, since the descriptor
is needed right afterwards anyway.
PR-URL: #60037
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
aduh95 pushed a commit that referenced this pull request Oct 22, 2025
There is no need to do the own property check, since the descriptor
is needed right afterwards anyway.
PR-URL: #60037
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.consoleIssues and PRs related to the console subsystem.needs-ciPRs that need a full CI run.performanceIssues and PRs related to the performance of Node.js.utilIssues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@BridgeAR@nodejs-github-bot@addaleax@ljharb@jasnell@cjihrig@gurgunday