-
-
Notifications
You must be signed in to change notification settings - Fork 715
perf: don't allocate when pushing or retrieving globals #7569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
WalkthroughProject-wide migration of “globals” representation from borrowed slices of &str to slices of Box. RuleContext now stores and accepts &'a [Box] and its is_global iterates and compares via as_ref(). AnalyzerOptions now returns &[Box] from globals() and accepts any iterator of Box in push_globals(). Call sites in registry and signals pass globals directly to RuleContext::new. CLI and service layers adjust collection/extension of globals, simplifying iterators and conversions without changing control flow or public signatures (except the AnalyzerOptions change). Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (7)
🧰 Additional context used📓 Path-based instructions (2)crates/biome_*/**📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.rs📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
🧠 Learnings (9)📚 Learning: 2025-09-10T08:05:22.867Z
Applied to files:
📚 Learning: 2025-08-11T11:50:12.090Z
Applied to files:
📚 Learning: 2025-09-10T08:05:22.867Z
Applied to files:
📚 Learning: 2025-09-10T08:05:22.867Z
Applied to files:
📚 Learning: 2025-08-11T11:50:12.090Z
Applied to files:
📚 Learning: 2025-09-10T08:05:22.867Z
Applied to files:
📚 Learning: 2025-08-11T11:46:05.836Z
Applied to files:
📚 Learning: 2025-08-11T11:50:12.090Z
Applied to files:
📚 Learning: 2025-09-10T08:05:22.867Z
Applied to files:
🧬 Code graph analysis (4)crates/biome_analyze/src/context.rs (2)
crates/biome_analyze/src/signals.rs (1)
crates/biome_cli/src/execute/migrate/eslint_to_biome.rs (1)
crates/biome_analyze/src/registry.rs (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (24)
🔇 Additional comments (13)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. Comment |
CodSpeed Performance ReportMerging #7569 will not alter performanceComparing Summary
|
Summary
Micro-optimisation: This PR assures we don't need to do unnecessary allocations for collecting vectors when either pushing or retrieving
globals
.Test Plan
Everything should stay green.
Docs
N/A