lensai icon indicating copy to clipboard operation
lensai copied to clipboard

The menu feels very laggy.

Open RENBOWS opened this issue 5 months ago • 13 comments

When scrolling through the page menu, it feels very sluggish.

https://github.com/user-attachments/assets/a41f2196-3528-44ff-8778-d7d33449c944

Although it may not seem like it in the video, the reality is that it has a lot of lag.

RENBOWS avatar Jun 06 '26 16:06 RENBOWS

hello, I'm facing the same issue. The menu section probably doesn't use the highest refresh available on device and defaults to 60Hz while the settings page and the browser homepage are using highest refresh rate possible

Cultsonfire avatar Jun 07 '26 12:06 Cultsonfire

​@Cultsonfire on my end, the app seems to be locked at 60Hz across the board, not only in that menu

Flanr4 avatar Jun 07 '26 12:06 Flanr4

​@Cultsonfire on my end, the app seems to be locked at 60Hz across the board, not only in that menu

hello dev, can support for higher refresh rates be added?

Cultsonfire avatar Jun 07 '26 12:06 Cultsonfire

I did a detailed performance analysis and when dragging the sheet the average build time is 5.8ms for Raster and 2.7ms for UI. That would theoretically allow > 120 frames per second! So most probably the issue is caused by flutter not selecting the highest available frame-rate automatically on some devices. I just added a new setting in General, to control the frame rate manually. Please wait for the next alpha release.

FaFre avatar Jun 07 '26 13:06 FaFre

New alpha is building right now

FaFre avatar Jun 12 '26 01:06 FaFre

@FaFre on the latest alpha, the app runs at maximum fps for me

Flanr4 avatar Jun 12 '26 09:06 Flanr4

The menu feels still laggy for me. How about you guys?

ninosandzak avatar Jun 12 '26 09:06 ninosandzak

The menu feels still laggy for me. How about you guys?

For some reason, performance is worse on the Home tab than on any other tab. I can see this using an FPS display, but I can't record it because it gets stuck at 60 FPS. Normally, in which other tab the menu bar runs at around 80 - 90 fps, the home tab limits them to 60-70 fps, as does the tab menu.

RENBOWS avatar Jun 12 '26 13:06 RENBOWS

The menu feels still laggy for me. How about you guys?

For some reason, performance is worse on the Home tab than on any other tab. I can see this using an FPS display, but I can't record it because it gets stuck at 60 FPS. Normally, in which other tab the menu bar runs at around 80 - 90 fps, the home tab limits them to 60-70 fps, as does the tab menu.

How do you measure the FPS so precisely?

ninosandzak avatar Jun 12 '26 13:06 ninosandzak

How do you measure the FPS so precisely?

I use GPUWatch in the developer options; I don't know if it's also available outside of Samsung.

Image

RENBOWS avatar Jun 12 '26 14:06 RENBOWS

How do you measure the FPS so precisely?

I use GPUWatch in the developer options; I don't know if it's also available outside of Samsung. Image

Thanks, but I don't have that

ninosandzak avatar Jun 12 '26 14:06 ninosandzak

on the latest alpha, the app runs at maximum fps for me

When I checked it earlier, I was using the built-in android feature in developer options:

Screenshot_2026-06-12-17-31-26-66_fc704e6b13c4fb26bf5e411f75da84f2.jpg

However, I’ve now installed FrameX (https://github.com/MaheshSharan/FrameX-Android) and can confirm that the FPS in this menu actually still drops to ~60, and if the menu is open on the home screen, it drops down to ~45

Flanr4 avatar Jun 12 '26 15:06 Flanr4

However, I’ve now installed FrameX (https://github.com/MaheshSharan/FrameX-Android) and can confirm that the FPS in this menu actually still drops to ~60, and if the menu is open on the home screen, it drops down to ~45

I understand, it happens to me too. I would have tried that system option, but it only shows the screen refresh rate, not the overall refresh rate.

RENBOWS avatar Jun 12 '26 15:06 RENBOWS

I guess the only fix is updating to flutters new rendering engine which previously caused performance issues especially with old devices. In my tests I could average 90 fps on the bottom sheet now, but it is possible that there are other regressions through this update. We need to observe this now a bit.

So the new alpha is using Impeller now for testing.

FaFre avatar Jun 18 '26 06:06 FaFre

In the new version, the FPS on my end now reaches 70–80 when the bottom sheet is opened from a tab. But on the home screen, the frame rate still only increases by about 2 FPS on average

Flanr4 avatar Jun 18 '26 08:06 Flanr4

This is definitely a limitation of the flutter framework. The render times itself are fast enough to provide 120fps, however flutter and probably it's platform view implementation are the bottleneck here. Nothing I can do here really from my side. The flutter team is working on improvements here but it will take more time to land in the flutter stable releases.

I will therefore close this for now.

FaFre avatar Jun 21 '26 02:06 FaFre