Slow loading of network share directories due to excessive data reading

Open
#226 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c, linux

Research direction

Reproduce the issue in Pix 3.4.5 by opening a mounted SMB directory on Linux Mint and monitoring network activity while the gallery loads. Start by investigating the repeated GIO content-type warnings shown in the console. Done means thumbnails or placeholders appear without reading all remote file data first, with directory loading remaining responsive.

Written by the indexing model from the issue text.

Description

Distribution

Linux Mint 22.1

Package version

3.4.5

Frequency

Always

Bug description

When trying to browse a gallery of a directory located on an SMB network share, Pix takes a very long time to show the contents. Monitoring network activity shows that hundreds of megabytes are being read from the network share before any thumbnails or content appear on the screen. It seems that Pix reads all the data in the remote directory before displaying the gallery.

The network connection is stable and fast. I can confirm that it is not the cause of the bottleneck.

It seems that this bug happens "Almost Always", like very rarely things load fast, but I couldn't isolate the cause.

Packages: All packages are up to date.

Steps to reproduce
  1. Open Pix and navigate to a directory on an SMB network share (mounted).
  2. Click on the directory to view its contents.
  3. Observe the delay and monitor network activity to see the excessive data being read.
Expected behavior

Pix should load the directory and display thumbnails or placeholders without reading all the data in the remote directory, allowing for faster loading times.
Or perhaps read the data asynchronously.

Additional information

Console output:
Running Pix from the console shows the following lines:

$ pix

(pix:850659): Gtk-WARNING **: 09:09:52.749: Failed to register client: GDBus.Error:org.gnome.SessionManager.AlreadyRegistered: Unable to register client

(pix:850659): GLib-GIO-CRITICAL **: 09:09:53.855: GFileInfo created without standard::content-type

(pix:850659): GLib-GIO-CRITICAL **: 09:09:53.855: file ../../../gio/gfileinfo.c: line 1821 (g_file_info_get_content_type): should not be reached

(pix:850659): GLib-GIO-CRITICAL **: 09:09:53.921: GFileInfo created without standard::content-type

(pix:850659): GLib-GIO-CRITICAL **: 09:09:53.921: file ../../../gio/gfileinfo.c: line 1821 (g_file_info_get_content_type): should not be reached

The last two lines get repeated every time a file is read, for each file when scanning a directory, whether the file is an image or not. Also when a directory is navigated to, and when a file is viewed, either by double-clicking it from the gallery browser or by navigating Next and Prev from an already open image.

Dominant language
C
Stars
270
Forks
47
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from linuxmint/pix

All issues in linuxmint/pix

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.