Open makesimple opened 2 years ago
To use the memory tools, we need a vm service connection, which is only available in debug and profile mode. @iskakaushik do you know if there is a way to run in profile mode in this unique run environment where the engine is launched outside of flutter tools?
@makesimple can you please provide specific steps on the workflow you use to launch your app and connect to DevTools?
To use the memory tools, we need a vm service connection, which is only available in debug and profile mode. @iskakaushik do you know if there is a way to run in profile mode in this unique run environment where the engine is launched outside of flutter tools?
@makesimple can you please provide specific steps on the workflow you use to launch your app and connect to DevTools?
The specific steps are:
Which command do you use to "Launch the flutter engine manually in the device." ?
Which command do you use to "Launch the flutter engine manually in the device." ?
The command is a linux executable application that i implemented for my platform.
It's similar to the implementation of other platforms,especially such as linux desktop.
My linux application was based on the APIs provided by the flutter engine (libflutter_engine.so):
flutter_engine/src/flutter/shell/platform/embedder/embedder.h
I can feed any parameters to the application as other platforms,so, i can pass flutter_assets dir to it, or libapp.so,icudtl.dat,and so on.
For profile mode, you have to build your engine accordingly. For instance, on Linux, when running in profile mode, the resulting bundle contains profile builds for '.so' files :
build/linux/x64/profile/bundle/lib/libapp.so
build/linux/x64/profile/bundle/lib/libflutter_linux_gtk.so
An easier solution, if possible for your app, would be to run it on desktop mode : it might help to spot performance issues in your Dart code, but it will not if your performance issues are in your embedder.
For profile mode, you have to build your engine accordingly.
How to build the engine for profile mode?
Hi,My flutter application has many memory leakages, So I want to specify which part consume the memory. Although I can get memory usage from devtools in debug mode, the debug mode has more memory usage than release mode,so the debug mode make the analyzing more complicated. I know there is a profile mode,but I don't know how to use it in my envirnment.my device is a tv box,runing on linux and arm cpu. no adb, and I had implemented a platform in the flutter engine. the flutter engine is launched by the shell script,not by the flutter tools. So,how to get the memory usage in release mode or profile mode?