Bug 423501 - insertSingleFileBasicData ignorant of mounted remote file systems and causing gui blocks
Summary: insertSingleFileBasicData ignorant of mounted remote file systems and causing...
Status: RESOLVED FIXED
Alias: None
Product: baloo-widgets
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Stefan Brüns
URL:
Keywords:
Depends on:
Blocks: 423082
  Show dependency treegraph
 
Reported: 2020-06-25 13:55 UTC by Harald Sitter
Modified: 2022-02-04 19:35 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Sitter 2020-06-25 13:55:33 UTC
When browsing remote mounted file systems dolphin can intermittently lock up on subdirectory counting. This appears primarily the case because the insertSingleFileBasicData function is checking if an url has a local path, but a local path doesn't mean it's a local disk

```
          bool isSizeUnknown = !item.isLocalFile();
          if (!isSizeUnknown) {
              const QPair<int, int> counts = subDirectoriesCount(item.url().path());
```

I'm not super sure what to do about it, possibly simply checking item->isSlow().

Along a similar note `static bool isDirectoryMounted` in KFileItem seems also relevant for this.

#0  __GI___getdents64 (fd=29, buf=buf@entry=0x31e27f0, nbytes=<optimized out>) at ../sysdeps/unix/sysv/linux/getdents64.c:32
#1  0x00007f0766355365 in __GI___readdir64 (dirp=0x31e27c0) at ../sysdeps/posix/readdir.c:65
#2  0x00007f076851cfb7 in Baloo::FileMetaDataProvider::subDirectoriesCount (path=...)
    at /home/me/src/baloo-widgets/src/filemetadataprovider.cpp:546
#3  0x00007f076851c565 in Baloo::FileMetaDataProvider::insertSingleFileBasicData (this=0x29a51a0)
    at /home/me/src/baloo-widgets/src/filemetadataprovider.cpp:159
#4  0x00007f076851e4ff in Baloo::FileMetaDataProvider::setFileItem (this=0x29a51a0)
    at /home/me/src/baloo-widgets/src/filemetadataprovider.cpp:336
#5  0x00007f076851eae7 in Baloo::FileMetaDataProvider::setItems (this=0x29a51a0, items=...)
    at /home/me/src/baloo-widgets/src/filemetadataprovider.cpp:408
#6  0x00007f07685163cc in Baloo::FileMetaDataWidget::setItems (this=0x29a52f0, items=...)
    at /home/me/src/baloo-widgets/src/filemetadatawidget.cpp:297
#7  0x00007f076908f9e7 in InformationPanelContent::refreshMetaData (this=0x28a89a0)
    at /home/me/src/dolphin/src/panels/information/informationpanelcontent.cpp:299
Comment 2 Méven Car 2022-02-04 19:35:48 UTC
Git commit 7aeedc4492e7eb368261f5de9314a96a18cc357a by Méven Car, on behalf of Bharadwaj Raju (away; can't respond).
Committed on 04/02/2022 at 19:35.
Pushed by meven into branch 'master'.

Skip slow files

Skips files which are slow according to `KFileItem::isSlow()`. Makes browsing local mounts of remote filesystems (like with rclone) much faster.

M  +4    -4    src/filemetadataprovider.cpp

https://invent.kde.org/libraries/baloo-widgets/commit/7aeedc4492e7eb368261f5de9314a96a18cc357a