Skip to content

Conversation

NathanaelA
Copy link
Contributor

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%.

@cla-bot cla-bot bot added the cla: yes label Oct 20, 2020
@darind
Copy link
Collaborator

darind commented Oct 20, 2020

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.

@NathanaelA

This comment was marked as abuse.

@darind
Copy link
Collaborator

darind commented Oct 20, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants