After few time form open and close in xamarin android application slow

Viewed 110

I was trying to check the performance of my Xamarin application. While I was reviewing the application, sometimes I felt the application was slow when the form opened and closed.

Here is the output of the logs.

[View] requestLayout() improperly called by 
crc643f46942d9dd1fff9.ScrollViewContainer{6bd65b5 V.E...... ......ID 
0,0-1080,2115} during layout: running second layout pass
[EGL_emulation] app_time_stats: avg=20.76ms min=4.90ms max=407.70ms 
count=49
[EGL_emulation] app_time_stats: avg=17.37ms min=5.31ms max=281.48ms 
count=49
[View] requestLayout() improperly called by 
crc643f46942d9dd1fff9.ScrollViewContainer{ee6ddca V.E...... ......ID 
0,0-1080,2115} during layout: running second layout pass
[EGL_emulation] app_time_stats: avg=27.24ms min=5.63ms max=655.06ms 
count=49
[EGL_emulation] app_time_stats: avg=15.11ms min=5.71ms max=223.53ms 
 count=48
[ame.pcrwsmobil] NativeAlloc concurrent copying GC freed 15993(626KB) 
 AllocSpace objects, 0(0B) LOS objects, 49% free, 5447KB/10MB, paused 
1.190ms,106us total 110.076ms
[View] requestLayout() improperly called by
crc643f46942d9dd1fff9.ScrollViewContainer{9c288ef V.E...... ......ID 
0,0-1080,2115} during layout: running second layout pass
[EGL_emulation] app_time_stats: avg=25.51ms min=5.87ms max=602.22ms 
count=49
[EGL_emulation] app_time_stats: avg=18.73ms min=6.01ms max=193.78ms 
count=42

Nothing's running anything in form load. Here is the functions and design Device log Device log

enter image description here

1 Answers

You keep pushing new pages onto the navigation stack. You need to use pushmodal to open a modal page and then

await Navigation.PopModalAsync()

to remove it from the stack. Otherwise you just keep opening new pages and they consume memory.

Related