hi,
i read somewhere that the number of init.js requests that ESRi spawns is somehow related to the number of cpu cores you have. is that true? is there a way to configure or control the number of requests that esri makes?
on my laptop, i see 8 requests after the very first init.js request.
for our application we are really sensitive to what we initially download and i'm trying to investigate if there's anything further we can avoid downloading and these 8 requests are quite obvious.
@NicolasGIS as you noted, there isn't a 1:1 relationship between the AMD CDN and a local build of the "@arcgis/core" ES modules. Those use two different module systems, so comparing them side-by-side will always result in different performance profiles.
In reviewing the jsapi-custom-worker sample, the network requests and overall performance appear to be working as-designed for "@arcgis/core". I tested the sample locally on my laptop using 4.31, and I didn't see any http request browser stalls. There's definitely a pause when the spatial-join.worker runs, but that's also expected. As I mentioned above, you'll need to use a tool such as Charles debugging proxy to help distinguish between actual http requests and requests are cached by the browser. The chrome developer console tools aren't always telling the full story.
Some things you can do on your end to ensure the best performance when building the SDK locally: