mozilla / code-review

Automated static analysis & linting bot for Mozilla repositories
Mozilla Public License 2.0
56 stars 42 forks source link

Filter fetched existing issues by revision and diff #2517

Closed vrigal closed 1 week ago

vrigal commented 1 week ago

Closes #2516

The approach by chunk would make the code more complex and still slow. I think the main issue here was the number of IssueLink returned by the JOIN. On my DB 10 hashes may return thousands of links.

I added a filter by revision/diff for existing issues. The estimated cost in pgadmin dropped from max 49265.77 to max 91.8 on my database. I also added an iterator() to be sure we avoid a memory issue there.