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
The generate_target function of ninja backend takes 55s for me on master, but 84s on the optionrefactors branch.
It seems it spends a lot of time constructing OptionKey objects. I think the @total_ordering decorator is one cause of that. Removing it allowed to reduce time to 64s in my profile.
Also, the __eq__ operator should use the _hash member instead of comparing tuples.
The text was updated successfully, but these errors were encountered:
OptionKey objects are used extensively. We want them with a simple API,
but they also need to be optimized to not compromise meson performances.
Since this is an immutable object, it is possible to cache the
OptionKey object creation. We need to do it using the __new__
to make the caching mechanism transparent.
Fixesmesonbuild#14245
The
generate_target
function of ninja backend takes 55s for me on master, but 84s on the optionrefactors branch.It seems it spends a lot of time constructing
OptionKey
objects. I think the@total_ordering
decorator is one cause of that. Removing it allowed to reduce time to 64s in my profile.Also, the
__eq__
operator should use the_hash
member instead of comparing tuples.The text was updated successfully, but these errors were encountered: