kostmo / circleci-failure-tracker

A log analyzer for CircleCI. Note that this project is now hosted at pytorch/dr-ci
https://github.com/pytorch/dr-ci
5 stars 2 forks source link

Builds list on commit details page loads slowly #52

Closed kostmo closed 5 years ago

kostmo commented 5 years ago

Example commit details page: https://dr.pytorch.org/commit-details.html?sha1=f3f372edc0981e2a85c18df0ae91bd4f60dfff44

This page uses the same underlying VIEW, "best_pattern_match_augmented_builds", as the build details page (see issue #49).

However, for reasons not yet discovered, the same query optimization method does not work between both uses of the view (querying by commit vs querying by build number).

kostmo commented 5 years ago

The following API endpoint now has improved performance: https://dr.pytorch.org/api/commit-builds?sha1=f3f372edc0981e2a85c18df0ae91bd4f60dfff44

Version Time
Original 17.8 sec
After best_pattern_match_augmented_builds view simplification (397efa1eccfcc8fc6f4a7fde4a353db0b35063bb) 8.5 sec
After manual predicate pushing (b57d574f53c5bd3315d1be7831fd0dc221f4d50d) 1.9 sec

cc @ezyang, @dskhudia