-
Notifications
You must be signed in to change notification settings - Fork 2
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
run getFromSimInMaster in parallel #8
Comments
It crossed my mind that parallel puppeteer may be significantly better than sequential aqua--maybe at some point we should redo aqua to use puppeteer? |
With how easy it was to set up puppeteer, I would definitely be interested in pursuing that. |
I would first want to see how nice it was for the binder work, as I think that will be a bit simpler. |
One big issue I'm running into is resource management. Generating a page per sim asynchronously works well when the number of sims is short; however, when trying to run through all sims, the same code performs terribly. My first thought is to chunk the sims into manageable sizes. So puppeteer would only have ~10 pages active at a time and process each asynchronously then move on to the next. Another though would be to gather the dataURLs from the demo sims instead of each individual sim. Pulling from the rendered sims results in a ton of images that are almost identical, while the demo sims provide a set of contrasting examples of each component. I assume we're also free to add more examples in joist/kite/scenery demos if necessary. Getting the sim usage might be a little trickier, but traversing the file system or perhaps using the requirejs node package would likely be pretty quick. We wouldn't get sim-specific images, but we could get the links to sims at least. |
I thought the demo sim just has one example of it, and some components have dynamic controls to adjust some options.
I agree they are all mostly identical. Maybe there is a way to minimize this part of the documentation since it is by far the largest section of content for each component, but it isn't proportionally that important. I think it will still be good to see how different sims use the same component, if most are the same, that is a nice data point for a designer.
@samreid and I thought about this originally, and it seemed like a whole can of worms. There are multiple ways that we use components in sims, so it is hard to search for them. |
When I was looking through the sun demo, the number spinner presents several different appearance options. I realize that most of the components only present a single version; is there a reason we couldn't add other examples? Another thought on a file system approach for which sims use which components is that it could run in parallel to the instance image fetching. |
If we are just worried about time, we could work to make sim loads on pupeteer. We are currently using a Sorry if we have already discussed this somewhere else and I just missed it. |
We could open more than one page in puppeteer.
The text was updated successfully, but these errors were encountered: