Open
Description
Creating a category typically installs 10s or 100s of new methods. This makes the call to ResumeMethodReordering
in Finalize
slower and slower. This can lead to noticeable delays of some 100s of milliseconds or even seconds if more than 100 categories are created. The call to ResumeMethodReordering
is only needed for the logic, which uses InstallTrueMethod
, which in turn triggers method reordering. Using overhead := false
avoids the problem, but also disables many unrelated and useful things. The problem is amplified by the fact that CAP methods are often installed multiple times, for example if cheaper derivations trigger (or even if a concrete derivation gets cheaper). Some actionable items:
- Avoid installing CAP methods multiple times, at least in the case where simply the same method is installed, only with a different weight.
- Allow to skip the logic part in
Finalize
with a more specific option thanoverhead := false
. Note that even if the logic of a category is disabled, the logic part inFinalize
has to be executed because the logic can be enabled at runtime. But maybe one could execute the logic part the first time the logic is enabled? Then we could maybe disable the logic by default. - Think about removing the logic completely.
Metadata
Metadata
Assignees
Labels
No labels