⚡ Optimize FileList#first_seen_at using filter_map#620
Conversation
This change replaces the `map` + `reject` chain with `filter_map` to reduce intermediate array allocations. Benchmark results showed ~1.2x improvement in iterations per second. Co-authored-by: danmayer <24925+danmayer@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. |
The `supercharge/redis-github-action` was failing due to Docker Hub rate limits. This change replaces it with the standard `services` configuration for Redis in GitHub Actions, ensuring reliable Redis availability for tests. Also includes the optimization for `FileList#first_seen_at`. Co-authored-by: danmayer <24925+danmayer@users.noreply.github.com>
💡 What: Replaced
map(...).reject(...).minwithfilter_map { ... }.mininCoverband::Utils::FileList#first_seen_at.🎯 Why: To reduce intermediate array allocations and improve performance. This avoids creating an intermediate array of all
first_updated_atvalues before rejecting strings.📊 Measured Improvement: Benchmark showed ~1.2x improvement (280 i/s vs 233 i/s).
PR created automatically by Jules for task 15604884147414864190 started by @danmayer