Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Question: Why do I see a blank screen for multiple seconds
@as-cii had explained to me at some point that he was seeing no much slower compile times with the native cache when dev tools are open. He's on a plane back to Europe but I'm sure he'll have more to say in a couple days. My understanding from what he tells me is that real world require cost is actually about 30ms but can't be measured when the profiler is enabled. If he can conform this is true, then it does seem like producing concatenated bundles does seem promising for reducing any of the fixed overhead associated with calls to require.
Thanks @samccone for the write-up and for your investigation.
So, as @nathansobo already mentioned, from an earlier investigation we have found out that the actual time we spend in compiling modules when DevTools are not open is about
That said, I believe we all agree that there's some other kind of cost when calling
Lazily requiring modules could be an option, but I would employ such technique only for expensive modules (as we have already done in the past, e.g. atom/spell-check#98): the problem I see with this optimization strategy is that it only works fine when requiring and executing modules happen at two very distinct moments in time, and I believe this doesn't hold true for the initial pile of require statements we have before instantiating an
We're already working towards avoiding to load packages that don't need to be activated right away in #9687, so I feel like that would let us save a good portion of those
With that in mind, I guess this means that bundling our core source files into one might be a solution: once again, I feel like it's just something we have to experiment with to really understand how much we can save out of those initial
Moreover, at the summit I think we've understood what it means to instrument the native code that gets executed during