Skip to content

perf(linter/eslint/no-obj-calls): use direct global matches#24076

Merged
graphite-app[bot] merged 1 commit into
mainfrom
codex/perf-no-obj-calls-23829
Jul 2, 2026
Merged

perf(linter/eslint/no-obj-calls): use direct global matches#24076
graphite-app[bot] merged 1 commit into
mainfrom
codex/perf-no-obj-calls-23829

Conversation

@camc314

@camc314 camc314 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace the small non-callable global list lookup with a direct matches! helper
  • defer resolve_global_binding scoping/node setup until after its existing global-reference check

Credit to Yagiz Nizipli for the original work in #23829.

Co-authored-by: Yagiz Nizipli yagiz@nizipli.com

Copilot AI review requested due to automatic review settings July 2, 2026 15:27
@github-actions github-actions Bot added the A-linter Area - Linter label Jul 2, 2026
@camc314 camc314 changed the title perf(linter/eslint): speed up no-obj-calls perf(linter/eslint/no-obj-calls): use direct global matches Jul 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR optimizes the hot-path performance of the eslint/no-obj-calls linter rule by reducing per-node overhead in common non-reporting cases, aligning with Oxc’s focus on minimizing work when most files produce no diagnostics.

Changes:

  • Replaced a small NON_CALLABLE_GLOBALS.contains(..) lookup with a direct matches!(..) check for faster global-name matching.
  • Deferred scoping() / nodes() access and binding-resolution work until after confirming the identifier is not a direct global reference.

@camc314 camc314 self-assigned this Jul 2, 2026
@codspeed-hq

codspeed-hq Bot commented Jul 2, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 5 untouched benchmarks
⏩ 66 skipped benchmarks1


Comparing codex/perf-no-obj-calls-23829 (55f9c85) with main (e6cee89)

Open in CodSpeed

Footnotes

  1. 66 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jul 2, 2026

camc314 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

## Summary
- replace the small non-callable global list lookup with a direct `matches!` helper
- defer `resolve_global_binding` scoping/node setup until after its existing global-reference check

Credit to Yagiz Nizipli for the original work in #23829.

Co-authored-by: Yagiz Nizipli <yagiz@nizipli.com>
@graphite-app graphite-app Bot force-pushed the codex/perf-no-obj-calls-23829 branch from 55f9c85 to 4781b2d Compare July 2, 2026 15:38
@graphite-app graphite-app Bot merged commit 4781b2d into main Jul 2, 2026
29 checks passed
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Jul 2, 2026
@graphite-app graphite-app Bot deleted the codex/perf-no-obj-calls-23829 branch July 2, 2026 15:42
camc314 added a commit that referenced this pull request Jul 3, 2026
## Summary
- replace the small non-callable global list lookup with a direct `matches!` helper
- defer `resolve_global_binding` scoping/node setup until after its existing global-reference check

Credit to Yagiz Nizipli for the original work in #23829.

Co-authored-by: Yagiz Nizipli <yagiz@nizipli.com>
camc314 added a commit that referenced this pull request Jul 3, 2026
## Summary
- replace the small non-callable global list lookup with a direct `matches!` helper
- defer `resolve_global_binding` scoping/node setup until after its existing global-reference check

Credit to Yagiz Nizipli for the original work in #23829.

Co-authored-by: Yagiz Nizipli <yagiz@nizipli.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants