We are debugging memory problems of some of our key customers in Google. As part of that, we are trying to see which assets end up consuming the most memory.
As a first data point, loading penguin.flr from a sample app into a simple hello_flutter app bumps memory usage by nearly 80M.
Before Flare:
App Summary
Pss(KB)
------
Java Heap: 1664
Native Heap: 10300
Code: 8416
Stack: 60
Graphics: 54964
Private Other: 5456
System: 3907
TOTAL: 84767 TOTAL SWAP PSS: 66
After Flare:
App Summary
Pss(KB)
------
Java Heap: 1836
Native Heap: 33440
Code: 9476
Stack: 60
Graphics: 94916
Private Other: 19316
System: 3947
TOTAL: 162991 TOTAL SWAP PSS: 62
A sizable increase is observed in native heap (+23M), graphics (+30M) and dart heap (+15M).
If the FlareActor is paused, the usage drops dramatically but is still 13M higher than baseline.
App Summary
Pss(KB)
------
Java Heap: 1652
Native Heap: 14152
Code: 9372
Stack: 60
Graphics: 61220
Private Other: 6800
System: 3900
TOTAL: 97156 TOTAL SWAP PSS: 62
With animation looping and size reduced to 10x10:
App Summary
Pss(KB)
------
Java Heap: 1832
Native Heap: 16208
Code: 9496
Stack: 60
Graphics: 78860
Private Other: 18836
System: 3987
TOTAL: 129279 TOTAL SWAP PSS: 62
Code:
return Scaffold(
appBar: AppBar(title: Text('Title')),
body: Center(
child: Container(
width: 10,
height: 10,
child: FlareActor(
"assets/Penguin.flr",
alignment: Alignment.center,
//isPaused: true,
fit: BoxFit.cover,
animation: "walk",
),
),
),
);
I have been getting these memory dumps in release mode using adb shell dumpsys meminfo.
Similar to issue: #238.
#228 is not submitted yet so I could not test turning off AA.
Is there any path here to reducing the Flare memory usage?
We are debugging memory problems of some of our key customers in Google. As part of that, we are trying to see which assets end up consuming the most memory.
As a first data point, loading
penguin.flrfrom a sample app into a simple hello_flutter app bumps memory usage by nearly 80M.Before Flare:
After Flare:
A sizable increase is observed in native heap (+23M), graphics (+30M) and dart heap (+15M).
If the FlareActor is paused, the usage drops dramatically but is still 13M higher than baseline.
With animation looping and size reduced to 10x10:
Code:
I have been getting these memory dumps in release mode using
adb shell dumpsys meminfo.Similar to issue: #238.
#228 is not submitted yet so I could not test turning off AA.
Is there any path here to reducing the Flare memory usage?