Smooth scrolling is not occurred in Xamarin Forms ListView when scrolling is performed continuously in Android platform
#4,082 opened on 2018/10/15
Repository metrics
- Stars
- (5,644 個のスター)
- PR merge metrics
- (30d に merged PR はありません)
説明
Hi Team,
Description
We are using the XF ListView and loaded a normal view(i.e., three labels and one image) in the ItemTemplate property and defined the CachingStrategy as “RecycleElement”. While scrolling continuously by fling action, scrolling gets stuck at some time in Android platform. Since, we are using the Xamarin Forms version 2.4.0.280 and TargetFrameworkVersion of Android is 7.1.
For your information, we have noticed that when the scrolling gets stuck in UI, at this time GC gets collected in the output window and we suspect that this degradation in scrolling(stuck) arises while GC gets collected.
11-09 12:44:37.365 I/art (18496): Starting a blocking GC Explicit 11-09 12:44:37.397 I/art (18496): Explicit concurrent mark sweep GC freed 314(9KB) AllocSpace objects, 6(504KB) LOS objects, 39% free, 7MB/12MB, paused 566us total 32.261ms 11-09 12:44:37.400 D/Mono (18496): GC_TAR_BRIDGE bridges 107 objects 209 opaque 10 colors 107 colors-bridged 107 colors-visible 107 xref 0 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.12ms tarjan 0.38ms scc-setup 0.11ms gather-xref 0.01ms xref-setup 0.00ms cleanup 0.04ms 11-09 12:44:37.400 D/Mono (18496): GC_BRIDGE: Complete, was running for 35.94ms 11-09 12:44:37.400 D/Mono (18496): GC_MAJOR: (LOS overflow) time 33.08ms, stw 35.23ms los size: 2048K in use: 112K 11-09 12:44:37.400 D/Mono (18496): GC_MAJOR_SWEEP: major size: 2048K in use: 1158K 11-09 12:44:39.167 D/Mono (18496): GC_BRIDGE waiting for bridge processing to finish
Can you please look into this and revert us the further details asap. We have attached the screenshot and sample too for your reference.
Also, can you please explain or provide a solution on how to overcome from this bug if custom controls are used. Since, it was replicated in custom controls too.
Steps to Reproduce
Step 1: Run the attached sample in Android platform. Step 2: Open the Output window Step 3: Now the ListView is loaded and lot of logcat is displayed in output window. Step 4: Clear the logcat from the output window. Step 5: Perform fling action continuously. Step 6: Note that GC collect logcat is displayed in the output window when scrolling gets stuck.(Issue)
Expected Behavior
There should not be any lag while scrolling the list.
Actual Behavior
A small lag could be seen while GC collection.