bazel-contrib / bcr-ui

Website for the Bazel Central Registry
https://registry.bazel.build
Apache License 2.0
14 stars 9 forks source link

Memoize determining git release commit #118

Closed hobofan closed 8 months ago

hobofan commented 8 months ago

I noticed that especially the build times for pages with a lot of releases (e.g. aspect_bazel_lib) were getting slower. As for those modules, there are also more pages to be built, this led to quadratic build time increases.

This memoizes the function that determines the commit on the BCR that corresponds to a release being published, which allows the result to be reused across pages.

For me locally that reduced the total build time from ~80s to ~20s!