You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed a relatively high CPU consumption when using the WebviewScaffold. It happens even when there are no changes within the WebView. The flutter performance profiler shows that there 60 frames per second updated despite no visible state changes.
After some investigation I've found that the culprit is the default initial child instantiated in webview_scaffold.dart line 148
It looks like this animated widget stays running all the time even when it's not visible. A simple workaround was to provide
initialChild:Container(),
in the WebviewScaffold constructor. It definitely fixes the issue with frame updates and high CPU load and subjectively makes the WebView working smoother.
I'm not sure what's the best way of fixing it. Perhaps having an empty initial child by default or removing this child when a page is loaded. But some changes seems to be necessary.
BTW, thanks for the great plugin!
The text was updated successfully, but these errors were encountered:
I noticed a relatively high CPU consumption when using the WebviewScaffold. It happens even when there are no changes within the WebView. The flutter performance profiler shows that there 60 frames per second updated despite no visible state changes.
After some investigation I've found that the culprit is the default initial child instantiated in webview_scaffold.dart line 148
It looks like this animated widget stays running all the time even when it's not visible. A simple workaround was to provide
in the WebviewScaffold constructor. It definitely fixes the issue with frame updates and high CPU load and subjectively makes the WebView working smoother.
I'm not sure what's the best way of fixing it. Perhaps having an empty initial child by default or removing this child when a page is loaded. But some changes seems to be necessary.
BTW, thanks for the great plugin!
The text was updated successfully, but these errors were encountered: