At first glance main work should be scanning given volume of
executable code. It should not make much difference if the
code is in single piece or in several pieces.
Concerning many parts, various plugin architectures seem to be
quite popular, mayby not with 1400 parts, but certainly with
hundreds.
But if you have data showing that having code in one piece helps
then we can try to do something.
> >> I suggest we add an extra build mode that builds a single executable,
> >> instead of 1400+.
> >
> > That would add considerable complexity to the build system and
> > probably would increase space use.
> >
> >> It should also reduce the build size, because of all these duplicated
> >> PE headers. (On windows, ecl build is over 100MB while sbcl build
> >> is 34MB.)
> >
> > Current build process depends on ability to load freshly compiled
> > files. During compilation we load categories and core domains.
> > Database build loads everything.
> >
> I mean, don't change build step much, only change the final binary.
> I tried before that concat 1400+ lsp file into one and compile
> to one single fas file.
OK, making "algebra fas" on FriCAS side should be relatively
strigtforward, we have list of all NRLIB-s and there is question
of "linking" them. The question is how well ECL suports it. In
a sense it is just linking many object files. But there is some
magic on ECL side, for example ECL wants to run init routines in
each object files. So basically it is question of ECL.
When building interpreter with ECL we use modified compile command,
so that we get linkable files. In algebra we use normal command
so that we get loadable .fas. In principle we could try third
command that produces both.
Another thing is using such a .fas. One way is to load it at
startup, but I am not sure if this would work well (once you
clear LOADED property on NRLIB name FriCAS will try to load
it second time).
> Also, this approach can help fricas on ecl on wasm, because loading
> domains one by one via network is too slow. Loading all domains
> at once is faster.
Is it really? IIUC connection setup takes some time, but once
set up connection can transfer hundreds of files. Also, typical
FriCAS run should only use part of algebra, not the whole. So
there is less data to transfer and less compute time spend in
LOAD.
--
Waldek Hebisch