Open Bug 1383118 Opened 7 years ago Updated 2 years ago

gtk 3 filechooser is slow in folders with many images

Categories

(Core :: Widget: Gtk, defect, P5)

54 Branch
All
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: allo, Unassigned)

References

Details

(Keywords: perf)

The Gtk(3) filechooser has a known bug* with folders which contain many files. This makes it hard to upload an image from a folder with about 20k images without long delays where the fileschooser and firefox are hanging.
The bug is open since 2007 without any visible progress, so firefox should probably try alternatives.

A workaround would be to change ui.allow_platform_file_picker in linux versions and improve the UI there. 

The gtk2 version did not have this problem, even when the gnome bug about the behaviour is from gtk2 times.
The problem exists in firefox since the first version, which used gtk3.


* https://bugzilla.gnome.org/show_bug.cgi?id=491512
Blocks: gtk3
Severity: major → normal
Component: File Handling → Widget: Gtk
Keywords: perf
Product: Firefox → Core
(In reply to alex from comment #0)
> The Gtk(3) filechooser has a known bug* with folders which contain many
> files. This makes it hard to upload an image from a folder with about 20k
> images without long delays where the fileschooser and firefox are hanging.
> The bug is open since 2007 without any visible progress, so firefox should
> probably try alternatives.
> 
> A workaround would be to change ui.allow_platform_file_picker in linux
> versions and improve the UI there. 
> 
> The gtk2 version did not have this problem, even when the gnome bug about
> the behaviour is from gtk2 times.
> The problem exists in firefox since the first version, which used gtk3.

This bug is 10 years old, and a version of GTK+ 2.12. 10 years ago, GTK+ 3.x did not exist. So either this bug existed just as much with the GTK+ 2.x versions, or it was never reported against GTK+ 3.x.

> * https://bugzilla.gnome.org/show_bug.cgi?id=491512

I have no idea why it's being marked as blocking a closed bug...
They seem to use this very old bug as meta bug for collecting the duplicates with the newest one from 2013 and a comment from 2017.

The point with the filechooser seems to be, that much functionality is implemented by the program using it. I reported the problem with the image preview (Bug 1321332) and too long filenames there and was told that the base filechooser doesn't even implement it on its own the preview area and its a mozilla bug.
I guess that problems like this one may depend on the application (firefox, gimp, ...) choosing to use mime-magic instead of fileextensions as well. Or they really have a year old bug open which would slow down the filechooser in all gnome applications.
Here they say its a firefox bug (but probably related to gtk2 at the time): https://bugzilla.gnome.org/show_bug.cgi?id=553187#c1
But in any case I think firefox should do something about it (maybe looking at filechoosers from toolkits like wxWidgets or similiar), as I do not have the impression that the gnome upstream is very active to fix it themselfes.
You're mixing everything up. If the file chooser is slow, file a bug and provide information that would allow to reproduce the problem. As it stands, you're referencing 10-year old (or nearly 10 year old) bugs.
The steps to reproduce are the same asked in the linked bug:
- put 20k images in and folder
- open an upload dialog and try to choose and file

Expected: works like in folders with few files

What happens: The filechooser hangs for tens of seconds.
Sorry for the typos, I posted from a mobile device with autocorrect
Summary: Do not use slow gtk3 filechooser → gtk 3 filechooser is slow in folders with many images
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.