When viewing a single photo, a gigantic XML file is loaded every single time
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 119
- Forks
- 72
- Avg merge
- 18h 42m
- Merged PRs (30d)
- 24
Description
When viewing a photo, in the background also an XML is requested that seems to contain the complete directory structure info (endpoint remote.php/dav/files/<user>/Photos/). This same file is being requested over and over again every single time I click on a photo to open the viewer.
Now, as my /Photos/ folder contains a lot of files (roughly 15000), the XML response is gigantic: somewhere around 15 MB. This means, that every single time when I click on a photo, the browser redundantly requests that same huge XML file. This same file, btw. is also requested when first entering the directoy. So why requesting it over and over again?
The result, of course is unbearably slow response times and lag when trying to view a single photo from within a big directory.
To Reproduce
Steps to reproduce the behavior:
- Open browser network tab in dev tools and look for
remote.php/dav/files/<user>/Photos/ - Go to a folder with lots of files
- Click on a photo to trigger the viewer
- Note, that a gigantic XML file is requested and that the photo is not shown until the XML is fully loaded
- Note that when closing the viewer and opening another photo, this same request of the XML file is fired again
- Note, how slow displaying an image becomes due to the redundant loading of the XML file
- Note, that when using the arrow buttons to switch to another photo, the XML is not requested again. It only happens during activation of the viewer
Expected behavior
Image in viewer loads quickly
Screenshots

Possible quick fix / workaround
The image file itself loads rather quickly. Maybe it is possible to display the image and not wait until the entirety of the XML is loaded (in case the redundant requests of the same XML file serve a purpose)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the photo viewer's activation flow and trace why opening a photo requests the remote.php/dav/files//Photos/ endpoint, using the browser network tab to reproduce it. Done means the image appears without waiting for a redundant 15 MB XML request, while switching photos with the arrow buttons continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100