Skip to content

⚡ Optimize getColumnValues lookup performance#180

Open
jaruesink wants to merge 1 commit intomainfrom
perf/optimize-get-column-values-14484012775607275744
Open

⚡ Optimize getColumnValues lookup performance#180
jaruesink wants to merge 1 commit intomainfrom
perf/optimize-get-column-values-14484012775607275744

Conversation

@jaruesink
Copy link
Copy Markdown
Contributor

@jaruesink jaruesink commented Feb 6, 2026

Implemented O(1) lookup for column options, reducing complexity from O(N*M) to O(N). Benchmark showed reduction from ~585ms to ~34ms for 100k rows and 1k options.


PR created automatically by Jules for task 14484012775607275744 started by @jaruesink

Summary by CodeRabbit

  • Refactor
    • Optimized internal data processing for option-based columns in data tables.

Co-authored-by: jaruesink <4207065+jaruesink@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 6, 2026

Walkthrough

The getColumnValues function in the data-table filter core module was refactored to use a Map-based lookup for matching option values instead of the find method, changing how non-matching values resolve while preserving overall filter behavior.

Changes

Cohort / File(s) Summary
Data Table Filter Logic
packages/components/src/ui/data-table-filter/core/filters.ts
Refactored option value matching in getColumnValues from using find() to a Map-based lookup approach for predefined option/multiOption columns. Changes how non-matching values are resolved (returns undefined instead of searching sequentially) while maintaining the same final filtered results.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A Map replaces find's long quest,
Option values pass the test,
Lookup swift, no more delays,
Filtering works in modern ways! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: optimizing the getColumnValues function's lookup performance from O(N*M) to O(1) using a Map-based approach, which is the core focus of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch perf/optimize-get-column-values-14484012775607275744

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 6, 2026

📝 Storybook Preview: View Storybook

This preview will be updated automatically when you push new changes to this PR.

Note: The preview will be available after the workflow completes and the PR is approved for deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant