Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
feat: improve context.find/findByTag() and interceptor perf #4377
Matching all bindings by a filter function can be expensive. This PR improves performance for one of the primary usage - find bindings by tags.
Main changes in this PR:
bajtos left a comment
I reviewed the pull request at high level. It's nice to see that a relatively easy change can improve the performance so much.
I am not very happy about the proposed (internal) design, let's do few more iterations please to improve it.
This pull request is introducing several changes: it introduces new Binding-level events, adds
I agree it's practical to see all changes in one place to understand how the high-level intentions map to underlying implementation details, and also to verify that all pieces fit together.
At the same time, this arrangement makes it very difficult to review the pull request in whole (because it's too large) and also to incrementally improve it by making small changes and reviewing only the recent changes. That's why we have a spike process, where we start with a throw-away prototype demonstrating feasibility of the chosen approach, and follow with a series of smaller pull requests that are easier to digest, review and incrementally improve.
I would really appreciate if you could split this PR into smaller chunks, it will make it much easier to review the proposed changes.
The first step could be the code & docs for new binding-level events and
That's helpful too.
As far as I can see, this is not a chore, you are introducing a new feature
See the thread in #4377 (comment):
@raymondfeng thank you for extracting smaller pieces out of the context class/file, the code structure looks much better now!
I am afraid I don't have enough energy to review the pull request in detail this week. I quickly skimmed through the changes and don't see any obvious major issues. Let's ask other owners of this functional area to review & approve the changes.