Closed YevheniyGloba closed 6 years ago
We are seeing the same issue with long build times, however our code has 67 messages and takes about 10 minutes to build. Please see https://github.com/hurwitzlab/elm-imicrobe-spa
Apparently this is a known issue with tuple pattern matching in elm 0.18: https://groups.google.com/d/topic/elm-dev/QGmwWH6V8-c/discussion
I followed the suggestion in the thread of breaking the tuple matching into nested cases and my build time decreased to 3-4 seconds.
For example, instead of case (msg, page) of
use case msg of
and redundantly handle the _ page cases where needed.
@mbomhoff, thanks. we have changed message handlers to reduce the number of possible variants in the case statement, and it works
Can this be closed? Seems like it has been worked out. 😄
@rtfeldman yes, it could be closed
Hello. I have a question regarding handling a lot of messages in the Main file for update section: type Msg = SetRoute (Maybe Route) | HomeLoaded (Result PageLoadError Home.Model) ...
Imagine that you have a lot of these messages (in our example we have 32 messages, and 31 of them are like HomeLoaded (Result PageLoadError Home.Model) .. and HomeMsg Home.Msg) And here we have a problem with building our app - it takes up to 50 seconds to build app.
Could you help us? Could you give us some help?