immich
immich copied to clipboard
[BUG] (web & mobile) Map loading very slowly with a lot of assets
The bug
I have more than 70k of assets and since adding more and more of them, I have noticed that the map is loading slower with more assets.
I assume this is due to all assets being preloaded on the map open, it would be nice if only the approximate counts were loaded in larger zoom levels and specific assets only when the map is zoomed in.
The OS that Immich Server is running on
Ubuntu 22.04, iOS 17
Version of Immich Server
v1.79.0
Version of Immich Mobile App
v1.79.0
Platform with the issue
- [ ] Server
- [X] Web
- [X] Mobile
Your docker-compose.yml content
N/A
Your .env content
N/A
Reproduction steps
1. Upload many assets
2. Open map on mobile or web
3. See that it takes very long for the map to load
Additional information
No response
The way the clustering UI feature works it needs all the assets up front. The alternative is probably a different tool or custom approach. Can you confirm that the API endpoint returns quickly and the clustering and rendering is what is slow?
Yes, that indeed is the case. The request takes 3 - max 5 seconds, and after that, it takes at least 10 seconds for something to show up. Furthermore, I believe it is still doing something in the background as the page hangs and it needs to be refreshed to navigate to a different page.
I'm facing the same issue with only 3000 assets, of which probably less than 1000 are geotagged at all.
Same here, 17k assets, with about 2k geotagged.
When I open the map, it loads only ~200 assets, but I know there are a load more (I have seen them in the map before in previously). It keeps loading and the webUI freezes (I have to refresh or go to another page). I also noticed the "Storage" on the bottom left keeps loading and never finishes on the map page. When I refresh into the timeline, it works fine again.
On mobile it behaves the same way, although if I select only "Show Favorite Only", it works perfectly.
I think I'm experiencing the same problem. My wife has 130,000 photos and when she logs in the ui hangs If you are quick and click on e.g. people, you can make it not hang. If you go back to photos, it hangs again. I can also see that my browser eats up my ram. There is no load on the server.
If I login with my user that has about 30 000 photos then it works and is fast and no delays what so ever.
I'm guessing you may have some bad data that is causing an issue.
Specifically, the network request to load gps data will probably contain assets with null.
Ok. I have the heap out of memory issue as well so I followed your advice emptying geocoding folder without success. How do I proceed with this? Should I start a new issue?
This issue is for tracking the map rendering being slow with lots of assets. Unrelated to that is the map not working because of bad data. Also unrelated is the microservices container running out memory and crashing. Those are three separate and independent issues. Yes, you can open a new issue for the bad data in the map, since there are already existing issues for the other two.
Is this still an issue with the new map provider?
My map is writing fine now, but I don't have "a lot of assets" compared to some other reporters.
@jrasm91 Thanks for the improvements! The web experience is much smoother now and the map loads very quickly. On mobile, it works OK as soon as it loads, but it still takes about 10-15secs to do that.
Yeah it is still all rendered clientside.
Thanks for the map improvements! In the latest release on mobile the map now loads in much quicker. Unfortunately, another issue appears now - every time I try to move the map, or zoom it, it hangs for about 10secs before compleating the action.
Hi, having the same issues but way worse. Map on app hangs for ~2 minutes, scrolling, zooming -> app hangs for ~2 minutes -> actually unusable
~200.000 assets immich 1.96.0 in docker on QNAP TS-646 iphone app 1.96.0
Hi, having the same issues but way worse. Map on app hangs for ~2 minutes, scrolling, zooming -> app hangs for ~2 minutes -> actually unusable
~200.000 assets immich 1.96.0 in docker on QNAP TS-646 iphone app 1.96.0
same behaviour on: iPhone 15 Pro Max immich mobile app 1.107.1 immich server v1.107.2 hosted on qnap ts-664 (docker)
I can confirm. I have the latest version of Immich running (app and server). I got 170k assets, most have GPS data.
The app freezes if the zoom factor captures too many clusters (what’s always true when initially going to the map since the whole world map is shown). It hangs for a few minutes and the iPhone and iPad get very hot.
Thanks for taking care!
Same here with two separate instances of the latest Android app and the latest server, both producing the same error. About 100k assets each.
For me it is just the android app, web version works fine on 1.124
Same for me on IOS. Web works fine on both desktop and mobile platforms, but the IOS app hangs in the map view whenever moving around
@alextran1502 Is this bugfix part of the “Stable Release” roadmap item for early 2025? Or is there any public source to see which bugfixes “Stable Release” will encompass?
For me, this particular bug is about the only thing preventing me from primarily using Immich over other photo solutions.
Cheers and thanks for your efforts! 💪🏼
@dangarmol It is not a must-fix bug before the stable release, but we hope to get to it since it causes issues with users who have ton of photos for a single month
@dangarmol It is not a must-fix bug before the stable release, but we hope to get to it since it causes issues with users who have ton of photos for a single month
Personally, if the feature is not working for anybody, then it would be better to deactivate it until fixed. Or is it just impacting a few of us?
Is there an option to customize the map API? This gives users more options. For example, due to network reasons, the experience of using this map in China is not as good as that of AutoNavi Map. Another app, "mt photo", allows you to customize the map API.
@mrlopezco it affect users with really big library, i.e around 150_000 assets and above
@mrlopezco it affect users with really big library, i.e around 150_000 assets and above
Wanted to share my experience since I think this issue applys to people with library's a lot smaller than 150K.
I have 39K photos, and 2.3K videos. On my Pixel 9 the map feature is pretty much unusable when I try to look at areas I have taken most of my photos, the video below demonstrates. I am trying to swipe around constantly during the whole video and you can see it freezes and hangs as I get over the areas I have taken a lot of photos at. On my device without the compression to make it small enough to upload here its a very smooth 60/90 FPS over the Atlantic ocean and it drops to 0 FPS for a few seconds at a time when I get over western united states.
If I zoom in a lot it will be smooth again until I get over the hotspots.
This is on a Pixel 9, both app and server on v1.125.7
https://github.com/user-attachments/assets/2de2aca1-57bf-4ab2-9ed4-77824e293788
Same here. I have ~29,650 images (jpg & heic) and ~600 videos (MP4). Running on iphone 15 pro, I have very similar experience where it hangs on areas of high concentration of assets.
Server is running v1.125.7 on self hosted container and IOS app is v1.125.3 on ios 18.3; but this issue has long existed and is the only thing preventing me from using immich as my primary photo solution.
On my iPhone 11 Pro Max with around 74.000 geotagged photos my phone hangs for 2 minutes when entering the map. After two minutes the heatmap shows, but when I zoom into a location the same happens, my phone hangs again for minutes, making the experience unusable on mobile.
In the browser however (on desktop) everything is fast and works like a charm.
Same, OnePlus 12 with ~50k photos and opening the map freezes whole app for 1 minute. Each movement also for next 1 min each map move. I have to zoom so there is <5k images to make it work more or less under few seconds.
This makes this feature unusable. On web it works fine.
Hey @alextran1502, any news on this? I think I saw there was some PR open but it was reverted.
For me, this bug means that if I ever enter the map view on iPhone 15 Pro, I need to force-close the app. Even waiting for more than 30 minutes doesn't seem to load anything there, just an empty map, "No photos in this area" and an unresponsive app. This is with version 1.133.1 on both server and iPhone. Tried it on Pixel 6 Pro with similar results.
I got my library down to 250k assets from 800k just to test if this would help, but it didn't seem to 🥲
@dangarmol the vert pr doesn't related to the perf part 😅