Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

each RuntimeWidget has a runtime instance, it has performance problem? #74

Open
HXiaoMing opened this issue Feb 27, 2024 · 5 comments
Open

Comments

@HXiaoMing
Copy link

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?

@ethanblake4
Copy link
Owner

Why not use HotSwap instead of RuntimeWidget?

@HXiaoMing
Copy link
Author

HXiaoMing commented Feb 27, 2024

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?

@ethanblake4
Copy link
Owner

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.

@HXiaoMing
Copy link
Author

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.

@ethanblake4
Copy link
Owner

ethanblake4 commented Feb 28, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants