architecture-components-samples icon indicating copy to clipboard operation
architecture-components-samples copied to clipboard

Extreme lags on Navigation sample

Open LouisCAD opened this issue 7 years ago • 9 comments
trafficstars

Navigation animations are extremely and consistently janky. I can count the frames. Sometimes between 3 and 10 frames only are drawn, the others are dropped!

LouisCAD avatar May 23 '18 09:05 LouisCAD

Unless you show your code, stack-trace or anything, no one will be able to guess anything.

bernaferrari avatar May 27 '18 00:05 bernaferrari

@bernaferrari The code is in this repo, unmodified. Compiled with Android Studio 3.2 Canary 15. Only the Android Gradle plugin has been updated. There are no guesses to take, just a performance issue to explain and tackle

LouisCAD avatar May 27 '18 11:05 LouisCAD

Have you tried method profiling?

Zhuinden avatar May 28 '18 01:05 Zhuinden

@Zhuinden Yes, but it doesn't help finding the bottleneck. Did anyone tried this sample? I just tried to run it on another device, running Android 4.4.2, and Fragment transitions lag a lot too.

LouisCAD avatar May 30 '18 08:05 LouisCAD

@yigit Are you experiencing these lags in the navigation sample during slide animations?

LouisCAD avatar May 30 '18 08:05 LouisCAD

Yeah, no problems.. I even integrated into my app (you can try here: https://github.com/bernaferrari/ChangeDetection) and no issues.

bernaferrari avatar May 31 '18 19:05 bernaferrari

@bernaferrari Your project doesn't drop frames during navigation like the sample here is doing 👍

LouisCAD avatar Jun 01 '18 10:06 LouisCAD

To open the about screen (the info icon) I'm using the exactly same animation as this repo is using, I only changed the length from 500ms to 250ms. You could use DU recorder to record your screen, so we may take a look..

bernaferrari avatar Jun 01 '18 15:06 bernaferrari

I got the same issue, the sample open Leaderboard is lags a lot. And I have done a method trace and I found the most of its time is doing draw operation, check the call chart below. wx20180607-174241 In addition, I found if you remove the avatar background android:background="@drawable/avatar_5_raster" from list_view_item.xml, the lags will relieve

2dxgujun avatar Jun 07 '18 09:06 2dxgujun