Optimize Bot Filter: Cache Ignored Authors to Enhance Performance - #8985
Optimize Bot Filter: Cache Ignored Authors to Enhance Performance#8985tamilr0727-ux wants to merge 1 commit into
Conversation
|
@tamilr0727-ux is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
This pull request introduces significant optimizations to the bot author detection mechanism by caching ignored authors, which should enhance performance, especially with large datasets. This aligns with our previous decisions to optimize performance in similar contexts, such as the CI analytics service for large repositories. It's great to see these improvements being implemented! Looking forward to your review. 😊 |
|
🚨 Hey @tamilr0727-ux, the CI Pipeline is failing on this PR and it has been marked as Please fix the issues before this can be reviewed. Here's how: 1. Run checks locally before pushing: npm run format:check # Check Prettier formatting
npm run lint # Run ESLint
npm run typecheck # TypeScript type check
npm run test # Run unit tests (Vitest)
npm run build # Verify production build passes2. Auto-fix common issues: npm run format # Auto-fix formatting with Prettier
npm run lint -- --fix # Auto-fix lint errors where possible3. Check the full failure log here: Once you push a fix and the CI passes, the |
24d2978 to
000a05f
Compare
Description
Optimizes
getIgnoredAuthors()inlib/bot-filter.tsby eliminating repeated synchronous filesystem operations when checking bot authors across large commit datasets.Changes
.commitpulse.jsonfrom being read from disk on everyisBotAuthor()invocation.caching/memoizationfor ignored-author configuration.fs.existsSync()andfs.readFileSync()calls inside array operations such as.filter().Verification
✅
vitest runpasses successfully.✅ Repeated
isBotAuthor()calls no longer trigger unnecessary synchronous disk reads.✅ Existing bot-filtering behavior remains unchanged.
✅ Large commit datasets can be processed more efficiently.
Fixes #8982
Pillar
Visual Preview
Can Check in the Files Changed Section.
Checklist before requesting a review:
CONTRIBUTING.mdfile.localhost:3000/api/streak?user=YOUR_USERNAME).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter.