immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
52.91k stars 2.81k forks source link

Web UI is slow in Firefox #12169

Open ingria opened 3 months ago

ingria commented 3 months ago

The bug

The latest version of Immich (1.113) is very slow and sluggish in the Firefox browser. For example, fully loading and rendering the main page (/explore) takes several seconds, while the same page in Chrome takes less than a second to load (it loads instantly, I don't even see the spinning Immich logo).

The OS that Immich Server is running on

Ubuntu 22.04

Version of Immich Server

v1.113.0

Version of Immich Mobile App

n/a

Platform with the issue

Your docker-compose.yml content

n/a

Your .env content

n/a

Reproduction steps

  1. Open web UI in Firefox browser

Relevant log output

No response

Additional information

The problem occurs even if all assets (.js, .css, etc) are cached, so the resource loading time is not the issue

pyccl commented 3 months ago

I used the edge browser, even after the initial update. A page takes about 10 seconds to open. And then it was ready in about 10 minutes.

alextran1502 commented 3 months ago

Can you guys give more context, how your server is setup and access, also a network tab capture or a video capture would also be helpful

deafmute1 commented 3 months ago

I'm also on firefox and not experiencing this - doesn't seem specific/due to firefox.

ingria commented 3 months ago

Here are the debugger screenshots. Both measurements are done without cache, on the same machine and using the same Immich instance.

Firefox

It takes about 1.5 seconds until the page fully loads and becomes responsive (1-2.4 seconds until blurred thumbnails show up).

2

Chrome

It takes about 320ms until the page fully loads and become responsive (0-320ms until blurred thumbnails show up).

1

For some reason the same computations take 2x times longer in Firefox than in Chrome

Lukas-Heiligenbrunner commented 3 months ago

Same for me. Timeline loads and when i scroll into a segment with lots of pictures on the same day (>10k) it just gets black and nothing loads also after some minutes. With the previous version it at least loaded (Very slow tho) Here's my profile, most of the time is spent with layouting: Firefox 2024-08-31 17.14 profile.json.gz Screenshot from 2024-08-31 17-17-18

alextran1502 commented 3 months ago

@Lukas-Heiligenbrunner did it load on the previous version?

Lukas-Heiligenbrunner commented 3 months ago

@Lukas-Heiligenbrunner did it load on the previous version?

Hey, yes it load on the previous version, but very slow. After like 1-2minutes and was very laggy, but it loaded. Is there any way to downgrade versions? :thinking:

alextran1502 commented 3 months ago

@Lukas-Heiligenbrunner with the new migration of database, you cannot downgrade to the previous version. Can you check the server log for when you scroll to this segment to see if the server has crashed?

Lukas-Heiligenbrunner commented 2 months ago

Ok :+1: The server did definitely not crash. I think its just a client thing and the page hangs up and the websocket disconnects.

MoshirMoshir commented 1 month ago

I also have this issue, though still not sure if it's an immich-specific or Firefox-specific problem, I just use chrome to avoid it;

Specs

I have Immich v1.118.2 on Truenas Scale (running on harddrives, with plenty of RAM, CPU, and GPU power to spare) I am using floorp (firefox fork) and comparing it with chrome (same extensions).

Issue

Going from different tabs, or just trying to load image takes anywhere between 10-100% slower compared to doing the same actions on chrome. This is usually a few seconds delay (a noticeably annoying delay) on typical actions (cycling tabs, clicking on a person profile album, etc) but the most notable case is the map; on firefox it takes probably about 10-30 seconds to load the map and images whereas on chrome it is near instant or only a second.

I do also get the issue where the entire page stops loading and will be stuck on the last action for a minute or two before continuing it's process, this does not happen in chrome.