[BUG] Slow preview and pictures/video load from device memory #781

Closed
opened 2026-02-04 22:28:15 +03:00 by OVERLORD · 46 comments
Owner

Originally created by @stefano99 on GitHub (Mar 30, 2023).

The bug

When loading from memory, the app starts to lag and the time required to load the previews goes to around 10s, 20s at times.

It happened as soon as I updated the app to the 1.51.0 version.

Resetting anad reinstalling does nothing.

That's how it looks like when I open the app, or when I scroll down the gallery:
photo_2023-03-30 19 24 37

Downgrading back to 1.50.0 brings back the usual speed.
Also, opening the gallery from another device which doesn't sync any folder or from the web doesn't present this behavior.

That's the log file:
Immich_log_2023-03-30T192314.732190.csv

The OS that Immich Server is running on

Ubuntu 20.04 HWE (Linux 5.15.0)

Version of Immich Server

1.52.0

Version of Immich Mobile App

1.52.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.7"

volumes:
  pgdata:
  model-cache:
  tsdata:

networks:
  t2_proxy:
    external: true
  immich:

services:
  immich-server:
    container_name: immich_server
    image: altran1502/immich-server:release
    entrypoint: [ "/bin/sh", "./start-server.sh" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - redis
      - database
      - typesense
    restart: always
    networks:
      - immich

  immich-microservices:
    container_name: immich_microservices
    image: altran1502/immich-server:release
    entrypoint: [ "/bin/sh", "./start-microservices.sh" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - redis
      - database
      - typesense
    restart: always
    networks:
      - immich

  immich-machine-learning:
    container_name: immich_machine_learning
    image: altran1502/immich-machine-learning:release
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - model-cache:/cache
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    restart: always
    networks:
      - immich

  immich-web:
    container_name: immich_web
    image: altran1502/immich-web:release
    entrypoint: [ "/bin/sh", "./entrypoint.sh" ]
    env_file:
      - .env
    restart: always
    networks:
      - immich
  
  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.0
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
    logging:
      driver: none
    volumes:
      - tsdata:/data
    restart: always
    networks:
      - immich

  redis:
    container_name: immich_redis
    image: redis:6.2
    restart: always
    networks:
      - immich

  database:
    container_name: immich_postgres
    image: postgres:14
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      PG_DATA: /var/lib/postgresql/data
    volumes:
      # - pgdata:/var/lib/postgresql/data
      - $DOCKEREXT/immich_docker/postgresql/data:/var/lib/postgresql/data
    restart: always
    networks:
      - immich

  immich-proxy:
    container_name: immich_proxy
    image: altran1502/immich-proxy:release
    environment:
      # Make sure these values get passed through from the env file
      - IMMICH_SERVER_URL
      - IMMICH_WEB_URL
    ports:
      - 2283:8080
    logging:
      driver: none
    depends_on:
      - immich-server
    restart: always
    networks:
      - t2_proxy
      - immich
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=t2_proxy"
      - "traefik.http.routers.immich-rtr.entrypoints=https"
      - "traefik.http.routers.immich.rule=Host(`photos.$DOMAINNAME`)"
      - "traefik.http.routers.immich.tls=true"
      - "traefik.http.routers.immich-rtr.service=immich-svc"
      - "traefik.http.services.immich-svc.loadbalancer.server.port=8080"
      - "traefik.http.routers.immich-rtr.middlewares=chain-no-auth@file"
    #   # - "traefik.http.routers.immich-rtr.middlewares=chain-nextcloud@file"
    # homepage labels
      - homepage.group=immich
      - homepage.name=immich
      # - homepage.icon=emby.png
      - homepage.href=https://photos.$DOMAINNAME
      - homepage.description="immich gallery/backup"

Your .env content

###################################################################################
# Database
###################################################################################

DB_HOSTNAME=immich_postgres
DB_USERNAME=...
DB_PASSWORD=...
DB_DATABASE_NAME=immich

# Optional Database settings:
# DB_PORT=5432

###################################################################################
# Redis
###################################################################################

REDIS_HOSTNAME=immich_redis

# Optional Redis settings:
# REDIS_PORT=6379
# REDIS_DBINDEX=0
# REDIS_PASSWORD=
# REDIS_SOCKET=

###################################################################################
# Upload File Config
###################################################################################

UPLOAD_LOCATION=/../..

###################################################################################
# Typesense
###################################################################################
TYPESENSE_API_KEY=
# TYPESENSE_ENABLED=false

###################################################################################
# Log message level - [simple|verbose]
###################################################################################

LOG_LEVEL=verbose

###################################################################################
# JWT SECRET
###################################################################################

# This JWT_SECRET is used to sign the authentication keys for user login
# You should set it to a long randomly generated value
# You can use this command to generate one: openssl rand -base64 128
JWT_SECRET=...

###################################################################################
# Reverse Geocoding
####################################################################################

# DISABLE_REVERSE_GEOCODING=false

# Reverse geocoding is done locally which has a small impact on memory usage
# This memory usage can be altered by changing the REVERSE_GEOCODING_PRECISION variable
# This ranges from 0-3 with 3 being the most precise
# 3 - Cities > 500 population: ~200MB RAM
# 2 - Cities > 1000 population: ~150MB RAM
# 1 - Cities > 5000 population: ~80MB RAM
# 0 - Cities > 15000 population: ~40MB RAM

# REVERSE_GEOCODING_PRECISION=3

####################################################################################
# WEB - Optional
####################################################################################

# Custom message on the login page, should be written in HTML form.
# For example PUBLIC_LOGIN_PAGE_MESSAGE="This is a demo instance of Immich.<br><br>Email: <i>demo@demo.de</i><br>Password: <i>demo</i>"

PUBLIC_LOGIN_PAGE_MESSAGE=...

# Alternative Service Addresses - Optional
#
# This is an advanced feature for users who may be running their immich services on different hosts.
# It will not change which address or port that services bind to within their containers, but it will change where other services look for their peers.
# Note: immich-microservices is bound to 3002, but no references are made
####################################################################################

# IMMICH_WEB_URL=http://immich-web:3000
# IMMICH_SERVER_URL=http://immich-server:3001
# IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003

####################################################################################
# Alternative API's External Address - Optional
#
# This is an advanced feature used to control the public server endpoint returned to clients during Well-known discovery.
# You should only use this if you want mobile apps to access the immich API over a custom URL. Do not include trailing slash.
# NOTE: At this time, the web app will not be affected by this setting and will continue to use the relative path: /api
# Examples: http://localhost:3001, http://immich-api.example.com, etc
####################################################################################

#IMMICH_API_URL_EXTERNAL=http://localhost:3001

####################################################################################
# OAuth Setting - Optional
#
# These setting will enable OAuth login for your instance of Immich
# Folow the instructions in the page https://immich.app/docs/usage/oauth to set up your OAuth provider
####################################################################################

# OAUTH_ENABLED=false
# OAUTH_ISSUER_URL=
# OAUTH_CLIENT_ID=
# OAUTH_CLIENT_SECRET=
# OAUTH_BUTTON_TEXT=Login with OAuth
# OAUTH_AUTO_REGISTER=true
# OAUTH_SCOPE="openid profile email"

Reproduction steps

1.Reset the app
2.Delete the data manually
3.Log back in
4.Try to scroll through the timeline, jump around, etc
  This works fine.
5.From the settings, select the folders where there are the photos already synchronized.
6.Try to scroll through the timeline and jump around it.
  Now it shouldn't load the assets.

Additional information

No response

Originally created by @stefano99 on GitHub (Mar 30, 2023). ### The bug When loading from memory, the app starts to lag and the time required to load the previews goes to around 10s, 20s at times. It happened as soon as I updated the app to the 1.51.0 version. Resetting anad reinstalling does nothing. That's how it looks like when I open the app, or when I scroll down the gallery: ![photo_2023-03-30 19 24 37](https://user-images.githubusercontent.com/19929876/228916171-609adae8-597f-42d5-8280-c606756c4bae.jpeg) Downgrading back to 1.50.0 brings back the usual speed. Also, opening the gallery from another device which doesn't sync any folder or from the web doesn't present this behavior. That's the log file: [Immich_log_2023-03-30T192314.732190.csv](https://github.com/immich-app/immich/files/11114263/Immich_log_2023-03-30T192314.732190.csv) ### The OS that Immich Server is running on Ubuntu 20.04 HWE (Linux 5.15.0) ### Version of Immich Server 1.52.0 ### Version of Immich Mobile App 1.52.0 ### Platform with the issue - [ ] Server - [ ] Web - [X] Mobile ### Your docker-compose.yml content ```YAML version: "3.7" volumes: pgdata: model-cache: tsdata: networks: t2_proxy: external: true immich: services: immich-server: container_name: immich_server image: altran1502/immich-server:release entrypoint: [ "/bin/sh", "./start-server.sh" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env environment: - NODE_ENV=production depends_on: - redis - database - typesense restart: always networks: - immich immich-microservices: container_name: immich_microservices image: altran1502/immich-server:release entrypoint: [ "/bin/sh", "./start-microservices.sh" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env environment: - NODE_ENV=production depends_on: - redis - database - typesense restart: always networks: - immich immich-machine-learning: container_name: immich_machine_learning image: altran1502/immich-machine-learning:release volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - model-cache:/cache env_file: - .env environment: - NODE_ENV=production restart: always networks: - immich immich-web: container_name: immich_web image: altran1502/immich-web:release entrypoint: [ "/bin/sh", "./entrypoint.sh" ] env_file: - .env restart: always networks: - immich typesense: container_name: immich_typesense image: typesense/typesense:0.24.0 environment: - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} - TYPESENSE_DATA_DIR=/data logging: driver: none volumes: - tsdata:/data restart: always networks: - immich redis: container_name: immich_redis image: redis:6.2 restart: always networks: - immich database: container_name: immich_postgres image: postgres:14 env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} PG_DATA: /var/lib/postgresql/data volumes: # - pgdata:/var/lib/postgresql/data - $DOCKEREXT/immich_docker/postgresql/data:/var/lib/postgresql/data restart: always networks: - immich immich-proxy: container_name: immich_proxy image: altran1502/immich-proxy:release environment: # Make sure these values get passed through from the env file - IMMICH_SERVER_URL - IMMICH_WEB_URL ports: - 2283:8080 logging: driver: none depends_on: - immich-server restart: always networks: - t2_proxy - immich labels: - "traefik.enable=true" - "traefik.docker.network=t2_proxy" - "traefik.http.routers.immich-rtr.entrypoints=https" - "traefik.http.routers.immich.rule=Host(`photos.$DOMAINNAME`)" - "traefik.http.routers.immich.tls=true" - "traefik.http.routers.immich-rtr.service=immich-svc" - "traefik.http.services.immich-svc.loadbalancer.server.port=8080" - "traefik.http.routers.immich-rtr.middlewares=chain-no-auth@file" # # - "traefik.http.routers.immich-rtr.middlewares=chain-nextcloud@file" # homepage labels - homepage.group=immich - homepage.name=immich # - homepage.icon=emby.png - homepage.href=https://photos.$DOMAINNAME - homepage.description="immich gallery/backup" ``` ### Your .env content ```Shell ################################################################################### # Database ################################################################################### DB_HOSTNAME=immich_postgres DB_USERNAME=... DB_PASSWORD=... DB_DATABASE_NAME=immich # Optional Database settings: # DB_PORT=5432 ################################################################################### # Redis ################################################################################### REDIS_HOSTNAME=immich_redis # Optional Redis settings: # REDIS_PORT=6379 # REDIS_DBINDEX=0 # REDIS_PASSWORD= # REDIS_SOCKET= ################################################################################### # Upload File Config ################################################################################### UPLOAD_LOCATION=/../.. ################################################################################### # Typesense ################################################################################### TYPESENSE_API_KEY= # TYPESENSE_ENABLED=false ################################################################################### # Log message level - [simple|verbose] ################################################################################### LOG_LEVEL=verbose ################################################################################### # JWT SECRET ################################################################################### # This JWT_SECRET is used to sign the authentication keys for user login # You should set it to a long randomly generated value # You can use this command to generate one: openssl rand -base64 128 JWT_SECRET=... ################################################################################### # Reverse Geocoding #################################################################################### # DISABLE_REVERSE_GEOCODING=false # Reverse geocoding is done locally which has a small impact on memory usage # This memory usage can be altered by changing the REVERSE_GEOCODING_PRECISION variable # This ranges from 0-3 with 3 being the most precise # 3 - Cities > 500 population: ~200MB RAM # 2 - Cities > 1000 population: ~150MB RAM # 1 - Cities > 5000 population: ~80MB RAM # 0 - Cities > 15000 population: ~40MB RAM # REVERSE_GEOCODING_PRECISION=3 #################################################################################### # WEB - Optional #################################################################################### # Custom message on the login page, should be written in HTML form. # For example PUBLIC_LOGIN_PAGE_MESSAGE="This is a demo instance of Immich.<br><br>Email: <i>demo@demo.de</i><br>Password: <i>demo</i>" PUBLIC_LOGIN_PAGE_MESSAGE=... # Alternative Service Addresses - Optional # # This is an advanced feature for users who may be running their immich services on different hosts. # It will not change which address or port that services bind to within their containers, but it will change where other services look for their peers. # Note: immich-microservices is bound to 3002, but no references are made #################################################################################### # IMMICH_WEB_URL=http://immich-web:3000 # IMMICH_SERVER_URL=http://immich-server:3001 # IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003 #################################################################################### # Alternative API's External Address - Optional # # This is an advanced feature used to control the public server endpoint returned to clients during Well-known discovery. # You should only use this if you want mobile apps to access the immich API over a custom URL. Do not include trailing slash. # NOTE: At this time, the web app will not be affected by this setting and will continue to use the relative path: /api # Examples: http://localhost:3001, http://immich-api.example.com, etc #################################################################################### #IMMICH_API_URL_EXTERNAL=http://localhost:3001 #################################################################################### # OAuth Setting - Optional # # These setting will enable OAuth login for your instance of Immich # Folow the instructions in the page https://immich.app/docs/usage/oauth to set up your OAuth provider #################################################################################### # OAUTH_ENABLED=false # OAUTH_ISSUER_URL= # OAUTH_CLIENT_ID= # OAUTH_CLIENT_SECRET= # OAUTH_BUTTON_TEXT=Login with OAuth # OAUTH_AUTO_REGISTER=true # OAUTH_SCOPE="openid profile email" ``` ### Reproduction steps ```bash 1.Reset the app 2.Delete the data manually 3.Log back in 4.Try to scroll through the timeline, jump around, etc This works fine. 5.From the settings, select the folders where there are the photos already synchronized. 6.Try to scroll through the timeline and jump around it. Now it shouldn't load the assets. ``` ### Additional information _No response_
OVERLORD added the 📱mobile label 2026-02-04 22:28:15 +03:00
Author
Owner

@alextran1502 commented on GitHub (Mar 30, 2023):

Can you help me confirm again which version of the mobile app you are running?

@alextran1502 commented on GitHub (Mar 30, 2023): Can you help me confirm again which version of the mobile app you are running?
Author
Owner

@stefano99 commented on GitHub (Mar 30, 2023):

The last one from the Play Store: 1.52.0
The slowness started with v1.51.0

@stefano99 commented on GitHub (Mar 30, 2023): The last one from the Play Store: 1.52.0 The slowness started with v1.51.0
Author
Owner

@alextran1502 commented on GitHub (Mar 30, 2023):

Are you experiencing the same issue if you access the instance with local IP?

@alextran1502 commented on GitHub (Mar 30, 2023): Are you experiencing the same issue if you access the instance with local IP?
Author
Owner

@stefano99 commented on GitHub (Mar 30, 2023):

Yes, it still happens
Tried just now and that's the result:
photo_2023-03-30 19 37 58

I'm shooting in HEIF and HEVC formats, can that be the issue?

@stefano99 commented on GitHub (Mar 30, 2023): Yes, it still happens Tried just now and that's the result: ![photo_2023-03-30 19 37 58](https://user-images.githubusercontent.com/19929876/228919093-12baf74b-3405-4f0b-b716-a8f5ee0069b0.jpeg) I'm shooting in HEIF and HEVC formats, can that be the issue?
Author
Owner

@alextran1502 commented on GitHub (Mar 30, 2023):

I'm shooting in HEIF and HEVC formats, can that be the issue?

It could be, since now it will try to read the local file to work with the offline mechanism. Before it loaded the data from the server

@alextran1502 commented on GitHub (Mar 30, 2023): > I'm shooting in HEIF and HEVC formats, can that be the issue? It could be, since now it will try to read the local file to work with the offline mechanism. Before it loaded the data from the server
Author
Owner

@stefano99 commented on GitHub (Mar 30, 2023):

Ok, I can try to shoot in jpeg for a couple of days and report back here if that improves the loading times.

@stefano99 commented on GitHub (Mar 30, 2023): Ok, I can try to shoot in jpeg for a couple of days and report back here if that improves the loading times.
Author
Owner

@alextran1502 commented on GitHub (Mar 30, 2023):

On my iPhone, I am also shooting in HEIC, but I don't experience this issue. Which phone are you using?

@alextran1502 commented on GitHub (Mar 30, 2023): On my iPhone, I am also shooting in HEIC, but I don't experience this issue. Which phone are you using?
Author
Owner

@stefano99 commented on GitHub (Mar 30, 2023):

I'm using a Samsung Galaxy S21

Also, it heats up a lot while loading the pictures in the Immich app

@stefano99 commented on GitHub (Mar 30, 2023): I'm using a Samsung Galaxy S21 Also, it heats up a lot while loading the pictures in the Immich app
Author
Owner

@alextran1502 commented on GitHub (Mar 30, 2023):

Can you go to the upload screen, then go to the album selection screen and click on this icon?

image

Does it load instantly, or are you also facing the same issue you are seeing on the main timeline?

@alextran1502 commented on GitHub (Mar 30, 2023): Can you go to the upload screen, then go to the album selection screen and click on this icon? ![image](https://user-images.githubusercontent.com/27055614/228930261-8ae56cc6-dae8-461d-b4c1-8f473412a8a9.png) Does it load instantly, or are you also facing the same issue you are seeing on the main timeline?
Author
Owner

@stefano99 commented on GitHub (Mar 30, 2023):

Same thing: it takes a lot to load, and scrolling while loading makes it worse.
I'm syncing also an album with only jpegs and it's the same.

That's how it looks
photo_2023-03-30 21 33 19

At the moment, don't know why, it's showing almost all the pictures as if they're only present on the server and not on the device.
But looking at the backup information, it showsthe Total and Backup numbers as matching, and the same as before, like this:
photo_2023-03-30 21 40 14

If the pics are uploaded but not present locally, it shows the pictures instantly, and the same for the previews.

There's also this error popping out in the logs:
photo_2023-03-30 21 40 17

@stefano99 commented on GitHub (Mar 30, 2023): Same thing: it takes a lot to load, and scrolling while loading makes it worse. I'm syncing also an album with only jpegs and it's the same. That's how it looks ![photo_2023-03-30 21 33 19](https://user-images.githubusercontent.com/19929876/228944507-be1f77b0-64d4-4ed7-9bf4-1a4e3f2743ee.jpeg) At the moment, don't know why, it's showing almost all the pictures as if they're only present on the server and not on the device. But looking at the backup information, it showsthe Total and Backup numbers as matching, and the same as before, like this: ![photo_2023-03-30 21 40 14](https://user-images.githubusercontent.com/19929876/228946517-37de12c3-251b-45d0-bc71-780d82b8cd43.jpeg) If the pics are uploaded but not present locally, it shows the pictures instantly, and the same for the previews. There's also this error popping out in the logs: ![photo_2023-03-30 21 40 17](https://user-images.githubusercontent.com/19929876/228946659-8a63bcb4-d508-47d6-9a33-00069d78791e.jpeg)
Author
Owner

@alextran1502 commented on GitHub (Mar 30, 2023):

interesting log. We haven't seen that before. Can you export the log and attach it here?

@alextran1502 commented on GitHub (Mar 30, 2023): interesting log. We haven't seen that before. Can you export the log and attach it here?
Author
Owner

@stefano99 commented on GitHub (Mar 30, 2023):

Sure!
Here it is:
Immich_log_2023-03-30T214349.208426.csv

Logging out and back in fixed it, btw

@stefano99 commented on GitHub (Mar 30, 2023): Sure! Here it is: [Immich_log_2023-03-30T214349.208426.csv](https://github.com/immich-app/immich/files/11115513/Immich_log_2023-03-30T214349.208426.csv) Logging out and back in fixed it, btw
Author
Owner

@stefano99 commented on GitHub (Apr 14, 2023):

Update after some time.

I moved the whole photo library away from the phone, and started shooting in jpg.
It's roughly 50 pictures now, and it's (of course) faster.
Still, it takes a bit to load the previews of the pictures from the local storage.
Noticeably more than the ones stored only on the server, which load almost instantly.

@stefano99 commented on GitHub (Apr 14, 2023): Update after some time. I moved the whole photo library away from the phone, and started shooting in jpg. It's roughly 50 pictures now, and it's (of course) faster. Still, it takes a bit to load the previews of the pictures from the local storage. Noticeably more than the ones stored only on the server, which load almost instantly.
Author
Owner

@fyfrey commented on GitHub (May 12, 2023):

can you check again with app version 1.55? we maybe did some improvements in the unreleased app version 1.54.1

@fyfrey commented on GitHub (May 12, 2023): can you check again with app version 1.55? we maybe did some improvements in the unreleased app version 1.54.1
Author
Owner

@stefano99 commented on GitHub (May 24, 2023):

Until version 1.56 it was identical.
Just updated to v1.57 and it looks like it's a bit faster!
Reloading assets after I close a picture it's still the same, but it's slightly faster when launching the app.

@stefano99 commented on GitHub (May 24, 2023): Until version 1.56 it was identical. Just updated to v1.57 and it looks like it's a bit faster! Reloading assets after I close a picture it's still the same, but it's slightly faster when launching the app.
Author
Owner

@fyfrey commented on GitHub (May 25, 2023):

thanks for checking again. at least the lazy loading seems to help a bit. are you still seeing loading times above 1 second?

and another test: can you create an album with only assets uploaded via web or CLI (not the app) and open that album in the app? does it load these assets fast?

@fyfrey commented on GitHub (May 25, 2023): thanks for checking again. at least the lazy loading seems to help a bit. are you still seeing loading times above 1 second? and another test: can you create an album with only assets uploaded via web or CLI (not the app) and open that album in the app? does it load these assets fast?
Author
Owner

@Obsidiannite21 commented on GitHub (Jun 29, 2023):

I'm also experience this issue. I reported it directly to @alextran1502 and @fyfrey via discord but wanted to put my info here to offer trouble shooting assistance if needed.

@Obsidiannite21 commented on GitHub (Jun 29, 2023): I'm also experience this issue. I reported it directly to @alextran1502 and @fyfrey via discord but wanted to put my info here to offer trouble shooting assistance if needed.
Author
Owner

@stefano99 commented on GitHub (Jun 29, 2023):

@fyfrey sorry for the late reply, didn't see the notification!

Yes I'm still getting high loading times.

If the file isn't in the phone memory, it's almost instant in loading the previews, so everything that's uploaded through anything else, or is been deleted from the phone, is fast.

@stefano99 commented on GitHub (Jun 29, 2023): @fyfrey sorry for the late reply, didn't see the notification! Yes I'm still getting high loading times. If the file isn't in the phone memory, it's almost instant in loading the previews, so everything that's uploaded through anything else, or is been deleted from the phone, is fast.
Author
Owner

@fyfrey commented on GitHub (Jun 29, 2023):

I think we can put in a workaround, to always load images from the server (configurable in the app settings). Unless we find the reason for this super slowness

edit: made this PR #3044 to provide the workaround as it seems there is no solution we can apply (since the issue is deep in one of Immich's dependencies)

@fyfrey commented on GitHub (Jun 29, 2023): I think we can put in a workaround, to always load images from the server (configurable in the app settings). Unless we find the reason for this super slowness edit: made this PR #3044 to provide the workaround as it seems there is no solution we can apply (since the issue is deep in one of Immich's dependencies)
Author
Owner

@fyfrey commented on GitHub (Jun 29, 2023):

I fear it's this bug: https://github.com/bumptech/glide/issues/4608

@fyfrey commented on GitHub (Jun 29, 2023): I fear it's this bug: https://github.com/bumptech/glide/issues/4608
Author
Owner

@Obsidiannite21 commented on GitHub (Jun 30, 2023):

Thank you for such a quick workaround!! @fyfrey

@Obsidiannite21 commented on GitHub (Jun 30, 2023): Thank you for such a quick workaround!! @fyfrey
Author
Owner

@stefano99 commented on GitHub (Jul 1, 2023):

@fyfrey I switched to jpeg after noticing this bug, and still getting the same behavior with the new images.
I have to say, though, that with HEIC and HEVC it's even slower, so it's not strictly related to HEIF/HEIC format, but it does make it worse.

The workaround is great! Thank you!

@stefano99 commented on GitHub (Jul 1, 2023): @fyfrey I switched to jpeg after noticing this bug, and still getting the same behavior with the new images. I have to say, though, that with HEIC and HEVC it's even slower, so it's not strictly related to HEIF/HEIC format, but it does make it worse. The workaround is great! Thank you!
Author
Owner

@fyfrey commented on GitHub (Jul 2, 2023):

Thanks for the info.

@stefano99 @Obsidiannite21 what resolution do the photos have? Is this like a 100 megapixel camera?

@fyfrey commented on GitHub (Jul 2, 2023): Thanks for the info. @stefano99 @Obsidiannite21 what resolution do the photos have? Is this like a 100 megapixel camera?
Author
Owner

@stefano99 commented on GitHub (Jul 2, 2023):

@fyfrey 12MP for photos, 4k@30fps for videos (but it's the same even at 1080p)

The loading time increases as the number of elements on local storage increases, so if I remove photos and videos from the local storage, the first couple of pics I take load almost instantly.
(The elements only on the server are not affected)

I'll keep an eye on that to see if there's a specific number of elements where it starts to lag.

@stefano99 commented on GitHub (Jul 2, 2023): @fyfrey 12MP for photos, 4k@30fps for videos (but it's the same even at 1080p) The loading time increases as the number of elements on local storage increases, so if I remove photos and videos from the local storage, the first couple of pics I take load almost instantly. (The elements only on the server are not affected) I'll keep an eye on that to see if there's a specific number of elements where it starts to lag.
Author
Owner

@Obsidiannite21 commented on GitHub (Jul 2, 2023):

@fyfrey @stefano99 Same here - 12MP for photos. I also have a large library.

@Obsidiannite21 commented on GitHub (Jul 2, 2023): @fyfrey @stefano99 Same here - 12MP for photos. I also have a large library.
Author
Owner

@stefano99 commented on GitHub (Jul 5, 2023):

I'm now at 56 between photos and videos and it's starting to lag a bit while loading or reloading the library after closing a pic/video or reopening the app.

@stefano99 commented on GitHub (Jul 5, 2023): I'm now at 56 between photos and videos and it's starting to lag a bit while loading or reloading the library after closing a pic/video or reopening the app.
Author
Owner

@fyfrey commented on GitHub (Jul 6, 2023):

With the newest release, you can enable the workaround in the advanced settings. Assets already uploaded should then load just fine

@fyfrey commented on GitHub (Jul 6, 2023): With the newest release, you can enable the workaround in the advanced settings. Assets already uploaded should then load just fine
Author
Owner

@stefano99 commented on GitHub (Jul 6, 2023):

@fyfrey thank you so much!
It seems to be working flawlessly!

Thank you!

@stefano99 commented on GitHub (Jul 6, 2023): @fyfrey thank you so much! It seems to be working flawlessly! Thank you!
Author
Owner

@Snyaify commented on GitHub (Aug 8, 2023):

@fyfrey thank you so much for workaround.
On my OnePlus 10 PRO with 12k photos in gallery it took eternity to load previews.

@Snyaify commented on GitHub (Aug 8, 2023): @fyfrey thank you so much for workaround. On my OnePlus 10 PRO with 12k photos in gallery it took eternity to load previews.
Author
Owner

@fyfrey commented on GitHub (Sep 10, 2023):

Could you all check whether another flutter app - Aves Gallery (https://github.com/deckerst/aves) has the same issues in loading thumbnails on your devices? If it works fine, we could probably look into how they do the image loading

@fyfrey commented on GitHub (Sep 10, 2023): Could you all check whether another flutter app - Aves Gallery (https://github.com/deckerst/aves) has the same issues in loading thumbnails on your devices? If it works fine, we could probably look into how they do the image loading
Author
Owner

@Obsidiannite21 commented on GitHub (Sep 10, 2023):

@fyfrey Aves Gallery worked flawlessly on my device with 10k ish pictures.

@Obsidiannite21 commented on GitHub (Sep 10, 2023): @fyfrey Aves Gallery worked flawlessly on my device with 10k ish pictures.
Author
Owner

@stefano99 commented on GitHub (Sep 10, 2023):

@fyfrey for me too Aves worked fast. Not as fast as the Samsung Gallery, but faster than how was Immich.
Lately though Immich is going way faster.
I had around 1k pictures and videos on device until last week, and it was way faster in loading the previews.
Still, sometimes it took around 5-10 secs to load the previews or the full image, but it's faster than before.

The problem, to me, is that it needs to reload the previews almost always, even when I'm just closing a picture.
This happens way more frequently if the image is loading from memory, and way less loading from the server.
And this makes the slowness more noticeable.

@stefano99 commented on GitHub (Sep 10, 2023): @fyfrey for me too Aves worked fast. Not as fast as the Samsung Gallery, but faster than how was Immich. Lately though Immich is going way faster. I had around 1k pictures and videos on device until last week, and it was way faster in loading the previews. Still, sometimes it took around 5-10 secs to load the previews or the full image, but it's faster than before. The problem, to me, is that it needs to reload the previews almost always, even when I'm just closing a picture. This happens way more frequently if the image is loading from memory, and way less loading from the server. And this makes the slowness more noticeable.
Author
Owner

@fyfrey commented on GitHub (Sep 10, 2023):

Thanks for testing! Sounds promising. Sadly, it's non-trivial to change the asset handling :-/
So, don't expect a fix soon. We'll need to discuss how to go about this, and what to do about iOS (Aves is Android only)

@fyfrey commented on GitHub (Sep 10, 2023): Thanks for testing! Sounds promising. Sadly, it's non-trivial to change the asset handling :-/ So, don't expect a fix soon. We'll need to discuss how to go about this, and what to do about iOS (Aves is Android only)
Author
Owner

@Krustak commented on GitHub (Mar 14, 2024):

Hi, Im on latest 1.98.2 version and sadly this BUG is still present. Enabling "Prefer remote images" works, but as I understand its just workaround ...

Image

@Krustak commented on GitHub (Mar 14, 2024): Hi, Im on latest 1.98.2 version and sadly this BUG is still present. Enabling "Prefer remote images" works, but as I understand its just workaround ... ![Image](https://github.com/immich-app/immich/assets/47980734/8806eed8-d0b8-4496-82e3-57dfb381dba2)
Author
Owner

@alextran1502 commented on GitHub (Mar 14, 2024):

@Krustak Correct, there seems to be some issue with some specific devices that have weird underlying API that cause the speed of getting local file really slow

@alextran1502 commented on GitHub (Mar 14, 2024): @Krustak Correct, there seems to be some issue with some specific devices that have weird underlying API that cause the speed of getting local file really slow
Author
Owner

@Ynng commented on GitHub (Apr 18, 2024):

Experiencing the same issue here on an Oneplus 12 shooting HEIC

@Ynng commented on GitHub (Apr 18, 2024): Experiencing the same issue here on an Oneplus 12 shooting HEIC
Author
Owner

@alextran1502 commented on GitHub (Apr 18, 2024):

@Ynng You can go into the settings and turn on "prefer remote images" in the "advanced section" to overcome this at the moment

@alextran1502 commented on GitHub (Apr 18, 2024): @Ynng You can go into the settings and turn on "prefer remote images" in the "advanced section" to overcome this at the moment
Author
Owner

@ZtereoHYPE commented on GitHub (May 13, 2024):

I have the same issue on a Google Pixel 8, and the only issue with the workaround is that it causes pictures to completely fail to load while I'm offline, which happens very frequently to me.

@ZtereoHYPE commented on GitHub (May 13, 2024): I have the same issue on a Google Pixel 8, and the only issue with the workaround is that it causes pictures to completely fail to load while I'm offline, which happens very frequently to me.
Author
Owner

@foyzur commented on GitHub (May 19, 2024):

I have the same issue on a Google Pixel 8, and the only issue with the workaround is that it causes pictures to completely fail to load while I'm offline, which happens very frequently to me.

I have the same problem. The workaround works but it does not while offline. On Samsung Galaxy S24 Ultra.

@foyzur commented on GitHub (May 19, 2024): > I have the same issue on a Google Pixel 8, and the only issue with the workaround is that it causes pictures to completely fail to load while I'm offline, which happens very frequently to me. I have the same problem. The workaround works but it does not while offline. On Samsung Galaxy S24 Ultra.
Author
Owner

@4f1sh3r commented on GitHub (May 23, 2024):

I have the same problem on my wife’s Galaxy S20. More information about my problem can be found here: https://github.com/immich-app/immich/discussions/9614

It could indeed have something to do with HEIC pictures. I know that she has some of them locally on the phone.

@4f1sh3r commented on GitHub (May 23, 2024): I have the same problem on my wife’s Galaxy S20. More information about my problem can be found here: https://github.com/immich-app/immich/discussions/9614 It could indeed have something to do with HEIC pictures. I know that she has some of them locally on the phone.
Author
Owner

@grazy27 commented on GitHub (Aug 20, 2024):

Same issue on S23 Ultra, 'preffer remote' helps, but native gallery is blazingly fast and it's local, maybe there's a special Samsung-specific API used for thumbnails?

@grazy27 commented on GitHub (Aug 20, 2024): Same issue on S23 Ultra, 'preffer remote' helps, but native gallery is blazingly fast and it's local, maybe there's a special Samsung-specific API used for thumbnails?
Author
Owner

@Leyous commented on GitHub (Jan 21, 2025):

I have the same issue on standard galaxy S23. Like some users said: HEIC format is even slower to load compared to JPG.

@Leyous commented on GitHub (Jan 21, 2025): I have the same issue on standard galaxy S23. Like some users said: HEIC format is even slower to load compared to JPG.
Author
Owner

@JshStadler commented on GitHub (Feb 26, 2025):

I also have this issue

@JshStadler commented on GitHub (Feb 26, 2025): I also have this issue
Author
Owner

@YarosMallorca commented on GitHub (Mar 5, 2025):

I also noticed this issue on my Pixel 6. It gets slower over time, but it doesn't get as slow as on an S23 Ultra. I compared it, and S23 Ultra is almost half as slow loading local thumbnails. And yes, HEIC is slower to load (especially photos taken with an iPhone) on both phones.

Not sure what is causing this, but turning on "prefer remote image" in Advanced settings resolves this completely.

@YarosMallorca commented on GitHub (Mar 5, 2025): I also noticed this issue on my Pixel 6. It gets slower over time, but it doesn't get as slow as on an S23 Ultra. I compared it, and S23 Ultra is almost half as slow loading local thumbnails. And yes, HEIC is slower to load (especially photos taken with an iPhone) on both phones. Not sure what is causing this, but turning on "prefer remote image" in Advanced settings resolves this completely.
Author
Owner

@laxmanpradhan commented on GitHub (Apr 6, 2025):

I have the same issue, local content on the phone is slow to load while content from the server load very fast. I'm using a Pixel 8 Pro which should be quite fast. Also if I view the same photos in a normal gallery like Fossify Gallery, there are no loading issues at all. I tried loging out and back in so it would rebuild the timeline but that didn't seem to help. Note the camera is taking JPG photos not HEIC.

@laxmanpradhan commented on GitHub (Apr 6, 2025): I have the same issue, local content on the phone is slow to load while content from the server load very fast. I'm using a Pixel 8 Pro which should be quite fast. Also if I view the same photos in a normal gallery like Fossify Gallery, there are no loading issues at all. I tried loging out and back in so it would rebuild the timeline but that didn't seem to help. Note the camera is taking JPG photos not HEIC.
Author
Owner

@danieldietzler commented on GitHub (Sep 12, 2025):

Should be fixed with the new beta timeline. If it's not please let us know and we can re-open

@danieldietzler commented on GitHub (Sep 12, 2025): Should be fixed with the new beta timeline. If it's not please let us know and we can re-open
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#781