flutter_eval
flutter_eval copied to clipboard
each RuntimeWidget has a runtime instance, it has performance problem?
i want to use many RuntimeWidget in flutter in order to implement hot update. each RuntimeWidget has a runtime instance, it has performance problem? it is possible all RuntimeWidget use a same runtime singleton ? any good idea to use RuntimeWidget in flutter?
Why not use HotSwap
instead of RuntimeWidget?
Why not use
HotSwap
instead of RuntimeWidget?为什么不使用HotSwap
RuntimeWidget呢?
Thanks for your reply.
Use HotSwap should place HotSwapLoader at the root of the flutter app. HotSwapLoader required a .evc file, it mean all the hot update code will generate in a same .evc file. The whole project hot update code it too many, the .evc file it is too big. In the future, it will be larger and larger. start an app is slowly cause the big .evc file.
For example, it fix a small bug, it will generate the whole project hot update code, output a large .evc file. No matter how small the bug, the user need download the only one, the large .evc file. I want to use RuntimeWidget to separate the big .evc file into many small .evc file to avoid this.
Any good idea to resolve it?
Have you actually tested that this causes a performance issue? I have not spent a lot of time on loading speed and size of EVC files because so far nobody has had this issue, but probably it could be improved greatly if this was an actual problem for you.
I want to use RuntimeWidget to separate the big .evc file into many small .evc file to avoid this.
There is no way to load multiple .evc files with a single Runtime, it is one Runtime per evc file always.
Have you actually tested that this causes a performance issue? I have not spent a lot of time on loading speed and size of EVC files because so far nobody has had this issue, but probably it could be improved greatly if this was an actual problem for you.
I want to use RuntimeWidget to separate the big .evc file into many small .evc file to avoid this.
There is no way to load multiple .evc files with a single Runtime, it is one Runtime per evc file always.
I have not actually tested that. Many runtime instance , let the data communication becomes more complex.
Well I would recommend that you shouldn't try to optimize performance until it is actually an issue that you have, then I can help you.