Open mahrud opened 4 years ago
This absorbs #786.
That might be okay, but it would have to be one database per prefix. Normally there are 2, but there might be more:
i6 : prefixPath
o6 = {/Users/dan/Library/Application Support/Macaulay2/local/, /Users/dan/src/M2/M2.git/M2/BUILD/dan/builds.tmp/gallium-development/usr-dist/}
o6 : List
Tying this one with #776 and #594.
Fixing arguably the slowest part of installing the packages happens here: https://github.com/Macaulay2/M2/blob/1e47260755100936bafd60d64013672dedd3941f/M2/Macaulay2/m2/document.m2#L319-L323 This also leads to awkward situations:
This is even the case in v1.16, by the way, nothing new. The reason is that
html TO
for each of the package links in that node callsgetPrimaryTag -> fetchRawDocumentation -> needsPackage
, as it need to read a key from the raw documentation database.Typically installing the packages doesn't occur often, so it's not a big deal, but apparently
html TO
occurs much more often in the WebApp mode, and every time a new package is involved it needs to be loaded for the reasons above, causing warnings and delays.Using a single documentation database instead would resolve this, because then you don't need to load a new package for even tasks as simple as
getPrimaryKey
.cc: @pzinn