mate-desktop / caja

Caja, the file manager for the MATE desktop
https://mate-desktop.org/
Other
265 stars 143 forks source link

Caja stops dynamically updating folders with more than 5000 files, no pref to change this. #1660

Open superkuh opened 1 year ago

superkuh commented 1 year ago

Expected behaviour

When Caja has a folder open it should dynamically update the contents of that folder in real time. If I add a file to the folder outside of Caja, Caja should still automatically and rapidly update the folder to show the new file.

I expect this to be some setting I can configure, either within the Caja preferences (it's not there) or some gsetting or the like. But none exists. Additionally, after searching the Caja codebase I can't find the number 5000 in there anywhere.

Actual behaviour

When Caja has a folder open with more than 5000 files it stops dynamically updating the contents of the folder in real time. If I add a file to the folder outside of Caja it does not ever appear. It will only show up when I manually hit the, "Reload the current location" folder.

My /proc/sys/fs/inotify/max_user_watches is 1000000 so it's not that. It's only caja/nautilus. Thunar keeps updating the same folders beyond 5k.

Steps to reproduce the behavior

Create a directory with more than 5000 files in it. Keep this directory open in Caja. Use an external application to save a new file to the folder. The new file will not appear.

MATE general version

1.8.2 and 1.24.1

Package version

mate-desktop Version: 1.8.2+dfsg1-2~trusty1 mate-desktop Version: 1.24.1-2

Linux Distribution

Ubuntu 14.04 Debian 11

Link to bugreport of your Distribution (requirement)

Multi-distro issue with MATE itself.

TuxRobotics commented 1 year ago

I have not looked at the Caja source, but I suspect this is because of the default inotify limits of the filesystem. See https://unix.stackexchange.com/questions/13751/kernel-inotify-watch-limit-reached

superkuh commented 1 year ago

Like I said in the initial description, "My /proc/sys/fs/inotify/max_user_watches is 1000000 so it's not that."

superkuh commented 1 year ago

Also, other GUI file managers like Thunar running side by side with Caja on the same system have absolutely no problem updating the large folders in real time. It's just a Caja problem.

lukefromdc commented 1 year ago

All Nautilus-based file managers have historically bogged down on really huge directories with 10,000+ files in them (think /var/lib/dpkg/info on Debian), dynamically updating in such a directory could make caja nearly unusable with it

superkuh commented 2 months ago

All Nautilus-based file managers have historically bogged down on really huge directories

I am not talking about getting bogged down. I mean once there are more than 1000 files in a directory (I've narrowed it down to that number) then Caja completely stops updating the directory. If I save a file to a directory I have open in Caja with my browser then look for it in Caja it will not be there. I'll have to hit the refresh button before it becomes visible.

As an aside, I have determined the limit is set to 3000 in Nautilus in gnome2. But in Caja it is set to 1000.

I have searched through the entire MATE codebase over the last couple years trying to find any instance of "1000" but I can't find anything. I'm starting to think its some default inherited from the Gtk3 lib code being used.