You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 than overhead := false. Note that even if the logic of a category is disabled, the logic part in Finalize 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.
The text was updated successfully, but these errors were encountered:
Creating a category typically installs 10s or 100s of new methods. This makes the call to
ResumeMethodReordering
inFinalize
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 toResumeMethodReordering
is only needed for the logic, which usesInstallTrueMethod
, which in turn triggers method reordering. Usingoverhead := 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: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.The text was updated successfully, but these errors were encountered: