Merged
Conversation
Collaborator
|
This is great optimization. Just note that with the single webpack bundle (leading to a single require) and code cache (in release mode), the effect of this optimization is mitigated. Actually this function will never be used in the hot path of an application run in release mode. Nevertheless, this optimization will improve load times during development and is worth including. |
This comment was marked as abuse.
This comment was marked as abuse.
Collaborator
|
Yes, you are right. Vendor and Bundle are still loaded from disk, even with code-cache on. But it's still worth checking the performance gain with an app built in Release and running on an actual device. |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR creates a custom version of the code that will loads the JS modules (i.e. require(module)). By not creating extra buffers and extra memory usage, this speeds up the loading of JS files by ~16%.