Skip to content

fix(mobile): reduce stutter/jank on search pages - #18363

Merged
alextran1502 merged 1 commit into
immich-app:mainfrom
Saschl:fix/search-jank
May 19, 2025
Merged

alextran1502 merged 1 commit into
immich-app:mainfrom
Saschl:fix/search-jank

Conversation

@Saschl

@Saschl Saschl commented May 18, 2025 •

Copy link
Copy Markdown
Contributor

Description

On the search pages (like ml search and album search), opening the keyboard shows as a very slow and stuttery animation (Xiaomi 14T pro, Android emulator it looks janky) after performing a search.

The flutter performance profiler shows significant times in rebuild every time the keyboard opens:

Screenshot 2025-05-18 232133

It seems like there are some widgets being rebuilt, as also the navigation bar on the bottom briefly changes its size when hiding the keyboard.

I've set resizeToAvoidBottomInset to the affected components which should avoid resizing (and therefore probably rebuilding (?) some of the assets. That helps espeically when there are many search results.

Flutter performance profiler shows no more significant jank when opening the keyboard (Android emulator).

Screenshot 2025-05-18 232755

Can also confirm that the animation is now smooth on my physical phone.

How Has This Been Tested?

  • Open search page, layout should look as before (also when opening the keyboard). Animation should be smoother.
  • Open album page, layout should look as before (also when opening the keyboard). Animation should be smoother.

Screenshots (if appropriate)

Quick comparison on my phone.

https://streamable.com/4akogh

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

@alextran1502
alextran1502 merged commit 9e47093 into immich-app:main May 19, 2025
savely-krasovsky pushed a commit to savely-krasovsky/immich that referenced this pull request Jun 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants