Closed fzyzcjy closed 3 years ago
Maybe it's a problem of dart's builder. I faced similar problems with other libraries that generate code
@EugenePisotsky so how do you solve it? thanks
@fzyzcjy I didn't. just replaced libraries that require code generation
@EugenePisotsky Ouch so which lib do you use instead of mobx.dart? IMHO there is no lib with exactly the same behavior...
@fzyzcjy GetX borrowed the idea. its state management looks very similar and easy to migrate. but they are not very appreciated by flutter community (accused of being toxic and false advertisement) and it brings too much other unnecessary features as part of the single library, so if it doesn't sound like a problem for you, you can give it a try :)
@EugenePisotsky Thanks for your reply. However, that seems not a very good choice...
Wow, that's a lot of "actions" , are those all from mobx stores? I have a full app with dozens of data classes and even more controllers that are mobx stores and I'm nowhere near that amount.
2-3 minutes doesn't sound too bad for a large codebase, but I think the issue is actually with build_runner. Sometimes I think it would be easier to just have a yaml file to configure stores and generate Dart code the old fashioned way, using plain string templates and sprintf.
@Rudiksz Hmm I guess so. I only have json and mobx code generators (and json are often fast)... My dart code is about 30~40k lines with maybe >100 stores (not counted, just guess #store)
Hi thanks for this lib! I find that its code generator is quite slow... For example, I run it and see the following. (sometimes even 2 or 3 minutes):
And I see it eats 1 core ("100% cpu") during this build. Is there any way to make it faster?