Mentions légales du service

Skip to content

Leverage useRefrepo from refrepo-ts

Philippe Virouleau requested to merge useRefrepo into master

This introduces two distincts changes:

  • when computing fallback data (used when initially loading the page, until the requests to the API succeeds): we now extract only the data necessary by the browse table when computing the fallback data. This brings down the file size from several MBs to ~250KB.
  • use the useRefrepo hook from refrepo-ts, which is parametrized by the base url and branch to reconstruct a refrepo by calling the API several times. This effectively transparently makes ~70 requests each loading a few KB, which allows nextjs to cache them, instead of calling the one "refrepo" entry point returning several MB of data which cannot be cached by nextjs. The amount of request might seem scary at first, but it's clearly unnoticeable during usage, and to put that number into perspective: opening an MR page on gitlab fires more than 120 requests :)

Merge request reports

Loading