Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android app stuttering upon opening the app #17129

Closed
2 of 4 tasks
pabsi opened this issue Mar 26, 2025 · 5 comments
Closed
2 of 4 tasks

Android app stuttering upon opening the app #17129

pabsi opened this issue Mar 26, 2025 · 5 comments

Comments

@pabsi
Copy link

pabsi commented Mar 26, 2025

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

Hello,
first of all, I tried searching for "stutter" or "lag" and only these 2 issues came up:

  1. Android App get laggy after switch to Library tab while many (about 1000) albums exists #12497
  2. Extreme stuttering in App when having a large amount of albums. #14185 (duplicate of the above)

So please forgive me if it already exists, and of course close this one as duplicate if that's the case.

Also, I'd like to mention that the issue I am experiencing, I already experienced it in the past, and was fixed (at least for me) on the release https://github.com/immich-app/immich/releases/tag/v1.121.0 (note the highlight "Notable fixes: album sync on the mobile app always ran when reopening the app, leading to degradation in performance and browsing").

Therefore, I can't really tell whether it's a regression or a new bug, or possibly even a misconfiguration of my Immich android app.

Basically when I open the app, after the loading screen "Building the timeline", when everything seems to be loaded, if I start scrolling I get the stuttering.
After a bit (less than a minute I think), I can scroll really smoothly, as usual.

On the web version it's smooth, no issues there.

The OS that Immich Server is running on

Docker version, on an Ubuntu 22.04.5 LTS host

Version of Immich Server

v.1.130.1

Version of Immich Mobile App

1.129.0 build.187 (latest on Google Play)

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

name: immich

volumes:
  model-cache:
  library-uploads:
    driver: local
    driver_opts:
      type: nfs
      o: "addr=192.x.y.z,rw,vers=4.1,nolock,soft,rsize=1048576,wsize=1048576,timeo=300,retrans=2,norelatime,noatime,nodiratime,async"
      device: ":/photos"

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    devices:
      - /dev/dri:/dev/dri
    volumes:
      - /etc/localtime:/etc/localtime:ro
      # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
      #- ${UPLOAD_LOCATION}:/usr/src/app/upload/library/
      - library-uploads:/usr/src/app/upload/library/
      - ${UPLOAD_LOCATION}/upload:/usr/src/app/upload/upload
      - ${THUMB_LOCATION}:/usr/src/app/upload/thumbs
      - ${ENCODED_VIDEO_LOCATION}:/usr/src/app/upload/encoded-video
      - ${PROFILE_LOCATION}:/usr/src/app/upload/profile
      - ${BACKUP_LOCATION}:/usr/src/app/upload/backups
    env_file:
      - .env
    ports:
      - 2283:2283
    depends_on:
      - database
      #- redis
    restart: always
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    healthcheck:
      disable: false

  database:
    container_name: immich_postgres
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    healthcheck:
      test: pg_isready --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' || exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1
      interval: 5m
      start_interval: 30s
      start_period: 5m
    command: ["postgres", "-c", "shared_preload_libraries=vectors.so", "-c", 'search_path="$$user", public, vectors', "-c", "logging_collector=on", "-c", "max_wal_size=2GB", "-c", "shared_buffers=512MB", "-c", "wal_compression=on"]
    restart: always

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
# https://immich.app/docs/guides/custom-locations/

# IMMICH_IGNORE_MOUNT_CHECK_ERRORS=true

UPLOAD_LOCATION=./immich

## Thumbnails
THUMB_LOCATION=./immich/thumbs
ENCODED_VIDEO_LOCATION=./immich/encoded-video
PROFILE_LOCATION=./immich/profile
BACKUP_LOCATION=./immich/backups

# The location where your database files are stored
DB_DATA_LOCATION=./postgres

# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
TZ=Europe/Madrid

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=xxxxxxxxxxxxxxxxxxxxx

# Redis
REDIS_HOSTNAME='192.x.y.z'

Reproduction steps

  1. Open immich app on Android phone and wait for "Building the timeline" to finish
  2. Start scrolling, and observe the stutter
  3. After a short period of time, the stutter goes away

Relevant log output

-

Additional information

Love the app and love the team behind it 💓

@shenlong-tanwen
Copy link
Member

shenlong-tanwen commented Mar 26, 2025

How many assets and albums do you have on your instance? FYI, we are also working on refactoring the sync mechanism and it would improve the performance a bit as the job will then be offloaded to a background isolate.

@pabsi
Copy link
Author

pabsi commented Mar 26, 2025

How many assets and albums do you have on your instance? FYI, we are also working on refactoring the sync mechanism and it would improve the performance a bit as the job will then be offloaded to a background isolate.

PHOTOS: 46549
VIDEOS: 4172

And albums:

Image

Sorry, I couldn't find a "Total Albums" stat anywhere :\ not sure if that's a thing?

@lbouriez
Copy link

From ChatGPT: Total = 206 albums
:)

@alextran1502
Copy link
Contributor

Tracking in #16851

@alextran1502
Copy link
Contributor

FYI, if you have auto foreground upload enable, disabling it will also help with the stuttering issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants