-
Notifications
You must be signed in to change notification settings - Fork 14
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
Move most or all of chipper-startup.js to a preload #773
Comments
@jonathanolson replied:
|
This seems related to #769. I agree that custom logic is needed for productionPreloads, productionStringsJS, productionJS, productionStartupJS, but I'm not seeing why (almost all?) of chipper-startup.js shouldn't be in a preload. What are the drawbacks of making it a standard preload? Can this be investigated further? |
@jonathanolson also said in slack:
|
So I realized that Scenery won't need chipper-startup, so I believe we can ignore my previous comment! It's possible to rewrite sim-development.html so that it calls loadURL on chipper-startup.js, however it's important to note that this CANNOT be a "preload" in general, because in the built form, it needs to be run AFTER the require.js script is executed, and would be more of a "postload". |
The change set looks great and works nicely, but I noticed around a 120ms delay in the startup time using this patch. This is a short amount of time, but it's longer than I expected. I still think we should proceed with this, but was surprised by the 120ms and wanted to run it past you. UPDATE: to clarify, I measured this time by putting Date.now() right before loading |
From #764
I said:
(8) Is there a way to get (almost all of) chipper-startup.js to run as a standard preload, referenced from
chipper/build.json
? That would help unify this new code with existing code, and get rid of the code like this:Moving toward this strategy may help us reach the goal of running this new code in requirejs + built mode?
The text was updated successfully, but these errors were encountered: