Fork me on GitHub
#figwheel-main
<
2020-08-17
>
reefersleep08:08:40

Are there ways to optimize the reload time of figwheel / figwheel-main?

reefersleep08:08:25

Seems to take anywhere between a second and 4 seconds for my app to discover a difference and load it. I wonder if it could be faster.

dominicm17:08:56

You're usually constrained by compile tones of a transitive namespace

reefersleep12:08:14

I’ll try different tones, perhaps something a bit darker 🙂

reefersleep12:08:46

But in all seriousness, yeah, I bet the main problem is all the dependencies/requires

reefersleep12:08:14

That’s what you were referring to, right?

dominicm14:08:42

Yeah *times and sheer size. I had a 1kloc namespace on a project, that I found the day I decided to investigate reload times

reefersleep16:08:33

Did you manage to shave real time off?

reefersleep16:08:08

Hm, that sounded like a lot, but actually there are probably a few ns’es like that on this project. I think they’re trunks though, not leaves, in the require-graphs.

dominicm19:08:25

In my case it was essentially a utility namespace. There wasn't a win quick enough relative to the time I had left on the project so I left it. No point breaking things for people!

reefersleep09:08:21

Sounds like the right choice. I find that usually, util namespaces are not that difficult to break up into smaller namespaces, so performing the refactoring itself is not that costly or error fraught; however, if the depending ns’es end up requiring most of the util ns’es anyway, the performance gain might not even be palpable.

grumplet22:08:39

Has anybody attempted a figwheel-main + deps + webpack + test combination yet? I have figwheel-main + deps + webpack working in my project, but am struggling to configure a test environment, and could do with a minimal working example or some docs for reference.