-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
Metacello re-fetches baselines even if they were fetched before #8161
Comments
The linear load directive for Metacello visits every baseline every time. For example in a load directive for
With some logging in
|
Moved from Metacello/metacello#539
Happens in Pharo 8, but seems the same in Pharo 9.
Hello 👋
Recently, we decided to refactor baselines in a lower part of our decently sized project. That refactoring included splitting baselines that declare a lot of packages into multiple baselines that clearly specify dependency of a smaller set of packages by referencing other baselines from other repositories. This resulted in a significantly increased loading times, in particularly the fetch step that creates a linear list of loading directives. Upon closer inspection it turned out that dependent baselines are analysed over and over again even if metacello supposedly visited them already.
Project structure
To simplify the debugging process we recreated our project structure in a playground organization https://github.com/bugginrack.
In that project we have a bunch of libraries (https://github.com/bugginrack/MyLibrary) with the following baseline dependencies:
On top of that there is a framework (https://github.com/bugginrack/MyFramework):
Next, we have a few projects (https://github.com/bugginrack/MyProject), some of them depend on each other (A, B and C):
Code size independency
Our thesis is that the size of the code-base does not have a significant influence on the fetching performance. To prove that we loaded the same baseline structure with a large (generated) code base ( video ) and without any code (video).
It took ~46s to finish the fetching phase for a project with a signicant amount of code:
and the same ~47s for a project without code:
Connection independency
To prove that it is connection independent we did the same experiment while loading code locally.
With code (video):
Without code (video):
FetchingEnd-Local-WithoutCode
The problem
The issue is that doubling the amount of same-level projects doubles the time it takes to fetch, while increasing the dependency depth exponentially increases the fetching time.
For our real system the loading times exceeded 2 hours.
Solution
The intermediate solution is of course to uglify, flatten and merge the baselines reducing the amount of interconnections to the minimum.
Q: Would it be possible to improve Metacello baseline fetching to skip already processed baselines?
Thank you!
The text was updated successfully, but these errors were encountered: