disable precompilation for now #182
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This package takes a massive amount of time to precompile (~100s) and most of that is due to the precompile workload. Removing the precompile workload makes it take 15s (and reduces the size of the precompile file from 135MB -> 5 MB).
Unfortunately, the
solve
methods getting compiled here specialize on input functions which means they are only valid if those identical functions are used. This means that the precompile workload is pretty much useless to reduce latency for a user. As an example, running an identical workload as to what is used in the precompile workload:We can see that it takes
with precompilation active and
with precompilation not active. There is some common code that can be reused but most of it has to be done from scratch. For example the
solve
function which is expensive is recompiled:The
part in the type shows that this is specialized and compiled for the input closures.
Until the package has been restructured to allow more of the compiled code to be reused I don't think it is worth spending this much time for all users in generating compiled code that is almost worthless to a user.
Alternatively, it could be possible to only precompile one combination of algorithm and problem which would probably compile the common parts that are reused by user code just as well as the current 36 alg + prob combinations that are precompiled.