Repository navigation
⚙️ Engine: Optimize HogQL Column Lookups & Hoist Date Formatter - #1462
alehar9320 wants to merge 1 commit into
Conversation
- Pre-compute hashtable column lookup map in parseVisitGlance to replace repeated O(N) columns.indexOf(...) calls with O(1) property access on tabular HogQL API payloads. - Hoist Intl.DateTimeFormat instance to module scope in formatFirstSeen to avoid repeated ICU locale initialization and GC allocation per request. - Add Vitest test cases in src/utils/visit-stats.test.ts for reordered columns and non-string header handling. - Update .Jules/engine.md journal with performance details. Co-authored-by: alehar9320 <5390430+alehar9320@users.noreply.github.com>
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| 🔵 In progress View logs |
me | 6ef03da | Sep 27 2026, 02:32 AM |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
HARD ABORT — Jules farm / Engine restackSame junk class as #1460 #1448 #1436 #1425 #1424 #1414 #1412 #1402 #1400 #1388 #1374 #1359 #1357 #1347 #1345 #1333 #1321 #1308 (and Dual CLOSE HOLD #1204 tip Tip: Why
Brand / AI-first
@jules Close this class. Do not restack, reopen, or open another Bolt/Engine/Vantage visit-stats Overlay HARD ABORT — closing unmerged. Do not restack. Closed by Bob (PR Review Lead Eng) as |
|
Johan UX review — tip HARD ABORT — do not merge. Do not Dual. Do not Jules-restack. Same Engine visit-stats HogQL column-map + date-formatter hoist farm as closed #1437 / #1436 / #1425 / #1424 / #1419 / #1414 / #1412 / #1402 / #1400 / #1390 / #1375 / #1359 / #1357 / #1352 / #1347. Tip: Why
Brand / AI-first
@jules Close this class. Do not restack, reopen, or open another Engine/Bolt/Vantage visit-stats Overlay |
Bundle ReportChanges will decrease total bundle size by 562.07kB (-48.89%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: molecular-mars-esmAssets Changed:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Performance gate (Finn)Verdict: small client-bundle regression — please fix before merge. Same class as #1460. The PR is framed as an edge/SSR win ( const stockholmDateFormatter = new Intl.DateTimeFormat('en-GB', { ... });
Evidence (esbuild 0.25, Footer-equivalent named imports,
|
| main | this PR | Δ | |
|---|---|---|---|
| Footer visit-stats slice (min) | 945 B | 1057 B | +112 B |
Intl.DateTimeFormat in Footer chunk |
absent | present (eager module init) | regression |
columnIndexMap / parseVisitGlance are still shaken out of the Footer path (good). Preview (Workers Builds: me) was still in progress at review time, so this is from the diff + a tree-shaken client bundle, not a Lighthouse run.
Ask
Keep the edge wins, but don’t hoist Intl into a module that Footer ships to the browser. Any of:
- Leave
new Intl.DateTimeFormat(...)insideformatFirstSeen(lazy; tree-shaken today), or - Split server-only helpers (
parseVisitGlance,formatFirstSeen/ formatter) into a file Footer does not import, or - Otherwise ensure the Footer client chunk stays free of eager
Intl/ ICU init.
Happy to re-check once the hoist is gone from the shared client path.
Optimizes tabular API column parsing in$O(N)$ $O(1)$ hashtable property lookups, and hoists
src/utils/visit-stats.tsby replacing repeatedcolumns.indexOf(...)array scans withIntl.DateTimeFormatto module scope to eliminate ICU locale re-initialization and GC overhead in Cloudflare Workers edge runtimes. Includes comprehensive Vitest coverage and updated.Jules/engine.mdjournal notes.PR created automatically by Jules for task 9712253326566882668 started by @alehar9320