-
-
Notifications
You must be signed in to change notification settings - Fork 671
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
[macro] Add modules created with defineType/defineModule as dependency of current module #11720
Conversation
... of current module. This makes sure those modules will be pulled from cache when restoring current module.
Hmm... intuitively, I'd say that the dependency relationship in these cases should not be symmetric. This would mean that if one generated module changes, all generated modules change by transitive property, which doesn't seem right. I do acknowledge that we have to restore these modules though. Perhaps such modules should instead become a cache-bound object of the original module? That way we can restore them, but they don't necessarily invalidate so much. |
Hmm right, I was naively thinking these would not invalidate, but that's not taking their own dependencies into account... Will look into cache bound objects for this. |
I suppose this is still not right:
Edit: ... which would pretty much make it a dependency again Considering the following:
Don't we need to invalidate |
I suppose the problem is that in such cases we can't tell what exactly we'd have to execute in order to define the module again... so yes the conservative approach is to do it via dependencies. I'm quite worried about the effect of this in big projects though, but then again I don't know if this was ever less of a problem before hxb. |
Yeah, will check against shiro projects tomorrow with timed recordings |
Results so far are very good, with recompilation and completion being 20-30% faster on northgard for example. ... which is a bit surprising Edit: same result on other shiro projects |
Yes, I don't think the change here could cause such an improvement... |
This makes sure those modules will be pulled from cache when restoring current module.
I can't think of a problem that doing this could cause right now; hopefully I'm not missing something obvious 🤔
This was not a problem pre-hxb (in most cases at least?) because we were keeping modules in the cache even if not referenced from anywhere.