Question: the 74 module one was killing me, for each view change... have you used webpack with HMR? @bkbooth was showing me that at a recent elm meetup, might be worth a look

Asked By
Asked At
2017-08-22 04:17:27

Found 15 possible answers.

User Answered At Possible Answer
golfingbuddha 2017-08-22 04:17:56 that is what i am currently using
mordrax 2017-08-22 04:18:03 it was able to swap out... ah crap hehe
golfingbuddha 2017-08-22 04:18:09 and its worse than elm-make
mordrax 2017-08-22 04:18:19 i guess it still has to compile the module... + dependencies
golfingbuddha 2017-08-22 04:18:23 yeah how many modules do you have? which I am reducing but still, some of it is unavoidable and we have a TON of modules
mordrax 2017-08-22 04:19:44 yep, there's no shortcuts, sucks
    457 text files.
damn... when did that jump up to 36k LoC...
100 of them are the generated server endpoints so about ~222 of our own
------------------------------------------------------------------------------- SUM: 322 11935 4031 36126 ------------------------------------------------------------------------------- Elm 322 11935 4031 36126 ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- v 1.72 T=2.30 s (139.9 files/s, 22629.4 lines/s) 135 files ignored. 456 unique files.
golfingbuddha 2017-08-22 04:21:30 lol we're at 20000 but with many more modules
mordrax 2017-08-22 04:22:36 my theory is it's the sum of files + loc per file, so the absolute worse would be if you had 1 file of 20000 loc, you'd be compiling your whole app on each change we're in the middle somewhere, and the goal is to get to the minimal set of types/functions/modules that needs to be recompiled on each change
golfingbuddha 2017-08-22 04:23:14 you don't think it would be faster all in one file?
jessta 2017-08-22 04:23:40 more independent modules means they don't have to be recompiled unless changed.
golfingbuddha 2017-08-22 04:24:09 so, having a small module that provides a function to a bunch of modules would slow it down or speed it up?
mordrax 2017-08-22 04:24:13 my unsubstantiated guess would be: no, it's prolly about the size of the AST that needs to be built and analysed each time
golfingbuddha 2017-08-22 04:24:16 and does file nesting matter?
jessta 2017-08-22 04:24:47 file nesting?
golfingbuddha 2017-08-22 04:24:48 nesting inside folders, etc

Related Questions