Select to view content in your preferred language

Configuring number of init.js requests?

939
12
11-06-2023 09:23 AM
JonathanTiu
New Contributor II

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.

 

JonathanTiu_0-1699291191258.png

 

0 Kudos
12 Replies
JonathanTiu
New Contributor II

Thanks for checking that @AndyGup  much appreciated!

i did some runs yesterday with esri 3 and did notice stalls as well so not specific to esri 4 - you're right.

Thanks.  Let me know if you come to any conclusion as to why the size of the workers jumped to 163k.

 

0 Kudos
JonathanTiu
New Contributor II

@AndyGup  Did you guys manage to figure out why there was an increase in the size of the workers between 4.27 and  4.28?

we've just bumped up to 4.29.  i haven't had a chance to see the sizes of the init.js requests in 4.29.

0 Kudos
AndyGup
Esri Regular Contributor

Hi @JonathanTiu  Yes, we did figure it out. It's related to fine tuning the API and how it uses workers under-the-hood. The size of the workers is just one parameter out of many that affects the initial load performance metrics. Overall, for our baseline testing apps, those metrics improved between 4.27 and 4.29.

With that said, if you have a simple, focused repro app that shows a major performance regression on the initial app load, then please open a Tech Support ticket so they can get this formally documented.