ocaml-opam / opam2web

A tool to generate a website from an opam repository
https://opam.ocaml.org
Other
56 stars 28 forks source link

Package pages: do not display reverse conflicts #229

Closed emillon closed 10 months ago

emillon commented 10 months ago

A conflict between A and B can happen because of several things:

In the package page, opam2web displays conflicts in a global way: it loads all the universe, and determines which packages conflicts with it (for whichever of the above reasons).

The problem with this approach is that it is slow: it requires analyzing the universe, for each package.

This commit does something simpler: it just displays the metadata corresponding to the package rendered on the current page. This is consistent with how ocaml.org now renders package metadata.

For an example of changed behaviour: dune.3.12.2 declares a conflict against old versions of merlin. the old behaviour would display a dune conflict on the merlin.3.3.9 page.

This creates a huge speedup: a 2077s job now takes 183s (11.3 times faster).