Campbell Jones

Results 126 comments of Campbell Jones

What applications were you seeing this happen with?

Thank you for doing right by Mono and WineHQ. 🧡

> There are a bunch of recursive functions there, and I also identified them as being extremely slow on large dependecy trees. Python is remarkably bad at recursion, I profiled...

I think I've managed to create a version that should cover all subclasses of Target - I added a `get_toplevel_link_deps` function that returns the same value as `get_all_link_deps` per class,...

> What about this? > > ``` > def get_all_link_deps(self) -> ImmutableListProtocol[BuildTargetTypes]: > result: T.List[Target] = [] > stack: T.Deque[Target] = deque() > stack.append(self) > while stack: > t =...

How about this, plus a change to link_whole_targets in the get_toplevel_link_deps impls: ```python3 @lru_cache(maxsize=None) def get_transitive_link_deps(self) -> ImmutableListProtocol[BuildTargetTypes]: result: OrderedSet[Target] = OrderedSet() stack: T.Deque[Target] = deque() stack.appendleft(self) while stack: for...

> How about this, plus a change to link_whole_targets in the get_toplevel_link_deps impls: > > ```python > @lru_cache(maxsize=None) > def get_transitive_link_deps(self) -> ImmutableListProtocol[BuildTargetTypes]: > result: OrderedSet[Target] = OrderedSet() > stack:...

Never mind, that fails because links_dynamically is only defined for custom targets. I'm just going to revert it back to link_targets to match master, because I'd rather avoid any side...

As stated, given that this PR is meant to be purely performance-oriented, I'm going to keep the function aligned to what master does. I'd be more than happy to open...

I agree that it shouldn't be backported into stable, but I don't see any reason to avoid backporting this PR *as is* into 1.5. It's a purely performance oriented fix...