You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
It may allow parallel fetching, need to test more. Also, generic mechanism for grouping these calls on a tracing/resolution "turn" may help server side bundling APIs. It may complicate the resolution semantics, the equivalent of completeLoad in current 2.x implementation.
Only so much bundling could be done though: for multiple module tracing, the dependencies of a module are not known until they are fetched, so there will still be multiple importScripts calls used. Doing optimized builds will still achieve the best results.
The text was updated successfully, but these errors were encountered:
We tried this (multiple urls with importScripts) in an Orion proof-of-concept fork of requirejs and it made not a hint of difference (at least in Chrome).
On the otherhand what did make a "huge" difference was doing an XHR to get the js blob and then calling importScripts on the Blob URL. This gave us parallel downloads and was many times faster.
I am surprised the XHR fetch helped much. I suppose it just seeds the browser cache with the contents of the blob URL. I would not want to do this for a default implementation, but it seems worth writing up how to override requirejs.load to do that sort of change. Feel free to add a page to the wiki about that approach.
Going to close this issue based on your feedback though, since it does not help.
It may allow parallel fetching, need to test more. Also, generic mechanism for grouping these calls on a tracing/resolution "turn" may help server side bundling APIs. It may complicate the resolution semantics, the equivalent of
completeLoadin current 2.x implementation.Only so much bundling could be done though: for multiple module tracing, the dependencies of a module are not known until they are fetched, so there will still be multiple importScripts calls used. Doing optimized builds will still achieve the best results.
The text was updated successfully, but these errors were encountered: