Lag and stuttering in the app drawer on 2013 Nexus 7 (running Android 4.4.2).

Change of screen orientation is a very destructive operation in Android. To an application it looks like the user is terminating the application. When the app comes back in the new orientation the app must rebuild the screen in new orientation which is going to have some performance impact. If you are doing something that is sensitive to momentary delays such as watching video or playing a game expect some delay, lose of frames, etc. when changing screen orientations.

The problem with that is it's not consistent. Plus it can lag in any app, such as Chrome for example, where it occurs most often. It does on the lock screen but not the home screen. It's just very jarring to me.
 
The problem with that is it's not consistent. Plus it can lag in any app, such as Chrome for example, where it occurs most often. It does on the lock screen but not the home screen. It's just very jarring to me.

Likely a function of whomever developed the application and just as importantly, what the application does. The developer might have written code to handle the rotation quicker or went with the default handling. In the worse case it could operate like this:

When you rotate the OnDestroy event handler is called. At that point it is up to app to do whatever it needs to resume when the application is relaunched. This can be nothing, or it can be to save the state of a game, browser, etc. If it is to save the state then this may entail writing data to local device, or if it is something that resumes everywhere (I believe Chrome does this so you can be in the same place on multiple devices) may involve writing data to a cloud store.

Then when the rotation completes the OnCreate() event handler is called. This is the one of the event handlers that is called when you first launch the application. If your device saved state that state must be restored. That may be quick if not much data was saved and it is locally available. Or it can be slow if the data is not local.

I am sure Chrome is optimized to operate better. But, a browser has the additional issue of needing to reflow the page being displayed. That involves is moving all the images, piece of text, etc around to make everything fit on the page which just got narrower and wider, or wider and narrower. That is a fairly intensive operation.
 
Last edited:
Every time when theres stuff like lag or stutter why does everyone cry art it varys wildly for everyone

Sent from my Nexus 7 2013 or iPhone 5
 
Rotation to a new orientation is a very disruptive operation. It requires close to shutting down the application. In fact it fires some of the same events as when the applications shutdown. It also cause the UI to switch from one source layout file to another source layout file and redraw from scratch everything on the screen. So I am not at all surprised that it cause a big impact if one changes orientation will watching a video.

Change of screen orientation is a very destructive operation in Android. To an application it looks like the user is terminating the application. When the app comes back in the new orientation the app must rebuild the screen in new orientation which is going to have some performance impact. If you are doing something that is sensitive to momentary delays such as watching video or playing a game expect some delay, lose of frames, etc. when changing screen orientations.

Likely a function of whomever developed the application and just as importantly, what the application does. The developer might have written code to handle the rotation quicker or went with the default handling. In the worse case it could operate like this:

When you rotate the OnDestroy event handler is called. At that point it is up to app to do whatever it needs to resume when the application is relaunched. This can be nothing, or it can be to save the state of a game, browser, etc. If it is to save the state then this may entail writing data to local device, or if it is something that resumes everywhere (I believe Chrome does this so you can be in the same place on multiple devices) may involve writing data to a cloud store.

Then when the rotation completes the OnCreate() event handler is called. This is the one of the event handlers that is called when you first launch the application. If your device saved state that state must be restored. That may be quick if not much data was saved and it is locally available. Or it can be slow if the data is not local.

I am sure Chrome is optimized to operate better. But, a browser has the additional issue of needing to reflow the page being displayed. That involves is moving all the images, piece of text, etc around to make everything fit on the page which just got narrower and wider, or wider and narrower. That is a fairly intensive operation.
I want to thank jerry for these really informative posts and relay how this information has helped me along with posts I've found on XDA that back up what he's said here.

During some recent tweaking I decided to perform some side by side comparisons with my N7 and the Mini Retina in our house. I found that in activities like home screen scrolling smoothness was pretty much on par. Where my N7 was falling short was in stutter while opening some apps and a slight and occasional stutter when rotating the screen. The iPad stood out noticeably in doing the latter much smoother.

Being a bit OCD when it comes to this, I took several steps. First I stopped doing complex theming and also uninstalled Zooper. Then I did an app cache wipe and wiped my cache partition as well. Then I opened developer options and switched all 3 animation scales to 0.5. I also limit the number of ad supported apps, and zero games that use push notifications. After doing all of this I had a marked improvement in the speed and smoothness of my app opening, scrolling, app drawer animations, and it's lasted longer over time.

Due to Jerry's explanation of how android handles screen rotation, the iPad is still ahead in that regard by a very tiny margin, but it's reduced enough now to satisfy my pickiness. Now I've ended creating heavily customized themes to adopt more minimalist style home screen layouts and stick to 3rd party widgets that prioritize having a minimal resource footprint.
 
I have found my Nexus 7 2013 to be generally smoother than my MIL's iPad Mini Retina. The iPad has a lot of distracting animations that make it look smoother to the uninformed, but they are just hiding that it is actually slower.

Sent from my VS980 4G using AC Forums mobile app