-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preload all extension types from include workflows #1890
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm limited in how much I can see far-reaching concerns here, but the changes look good to me. Just a few requests for clarity.
Significant groundwork was required to avoid dependencies on the instance field. Mostly this involved making all property serializer methods static.
@PathogenDavid I ended up doing one final refactor to defer workflow assignment as you suggested in #824. Turns out the fix required significant groundwork to avoid depending on The refactoring in itself is definitely an improvement. I was a bit worried something might break, but thankfully the most complicated infrastructure was already in place and we have some test coverage of some of the most subtle edge cases which got triggered and fixed. I have also tested usage with some fairly complex workflows and everything seems to work fine. |
Include workflows are loaded lazily and on-demand during the workflow build step, which means extension type discovery is performed in step-fashion for a newly loaded workflow. This gradual type discovery has dramatic implications in performance as documented in #1680, and this was having a visible impact on editor loading times, especially for complex applications with large numbers of include workflows.
This PR aims to improve the performance by preloading all extension types from included workflows ahead of time. The serialization of workflow properties was also optimized to minimize the number of required serializer instances.
The preloading optimization is disabled during builds to avoid supra-linear costs when recursively loading included workflows with deeply nested self-repeating motifs where the same workflow might be referenced multiple times.
Fixes #1680
Fixes #824