chore: measure impact of the Graph mixins on tree-shaking [poc] #639
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DISCLAIMER
Context
The Graph class is very large and it has been partially splitted into mixins, to organize the code per feature. However, at runtime, this is the same as having the whole code in the Graph class definition, so some unused elements are sometimes included in an application.
This increase the size of the application. We have a plugin mechanism, that could replace this in the future.
Prior providing ways to improve the tree-shaking in this situation, here are some figures about the impact of the mixins in 2 very simple applications included in this repository.
Disclaimer
The sole purpose of this PR is to measure the impact of removing mixins on the tree-shaking.
The TypeScript compilation pass here but some features are lost or may not work in the 2 examples used to measure the impact of the removals.
Results
Note: initial commit = few commits after tag v0.14.0
ts-example no default
js-example no default