refactor: fetch orama-db.json when search triggered#759
refactor: fetch orama-db.json when search triggered#759canerakdas wants to merge 2 commits intonodejs:mainfrom
Conversation
PR SummaryMedium Risk Overview Overrides the Orama client’s Reviewed by Cursor Bugbot for commit a855996. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #759 +/- ##
=======================================
Coverage 78.42% 78.43%
=======================================
Files 157 157
Lines 13959 13963 +4
Branches 1152 1152
=======================================
+ Hits 10948 10952 +4
Misses 3006 3006
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a855996. Configure here.

Description
Since we're not using Orama Cloud with
doc-kit, the generated files end up being quite large. With this change, we'll fetch the required file only when search is triggered, avoiding downloading this large file unnecessarily.For example, on the https://nodejs.org/learn page, the total download size is around ≈ 470kB, and about ≈ 250kB of that comes from
orama-db.json. Considering that it's not certain whether the user will even use the search feature, this overhead feels quite significant;Validation
Everything should work smoothly in the preview. It would be good to throttle the network (e.g., simulate a slow connection) and verify that there are no noticeable slowdowns.
Check List
node --run testand all tests passed.node --run format&node --run lint.