meson icon indicating copy to clipboard operation
meson copied to clipboard

options refactor: OptionKey initialisation is too slow

Open bruchar1 opened this issue 2 weeks ago • 1 comments

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.

bruchar1 avatar Feb 12 '25 13:02 bruchar1