Bug 398612 - freefilesystem polling rate too high for !file URI?
Summary: freefilesystem polling rate too high for !file URI?
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-14 10:33 UTC by Harald Sitter
Modified: 2020-10-30 10:45 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Sitter 2018-09-14 10:33:26 UTC
I've been working on the sftp kio slave a bit and noticed that dolphin apparently polls free space info about every 10 seconds, which seems super expensive. Also, as each poll basically results in talk on the network device dolphin may ultimately cause the network device to come out of sleep and because ssh is somewhat expensive the CPU to go into a more active state.
All to update information that changes not nearly often enough.

Ideally:
- polling should maybe be reduced to 60 seconds?
- refresh would always poll (i.e. bypass the poll timer)
- maybe even increase the poll time more if the watched URI is not a file://, i.e. for all probably non-local URIs only poll ever 5 minutes?
- polling should possibly not occur at all if the window/tab is not actually visible to the user at all (currently the sftp slave is getting woken up regardless of the user being able to see the poll results)
- addditionally we could perhaps figure out what kind of mount a file://FOO is actually on and only do regular polling if it is a well known local file system type (i.e. polling of an nfs or sshfs mount should still be using a lower rate really). seems a bit much work for little gain though.
Comment 1 Kai Uwe Broulik 2018-09-19 08:20:44 UTC
Git commit 391006130e31b80ecc55343f44bddaf06951c90f by Kai Uwe Broulik.
Committed on 19/09/2018 at 08:20.
Pushed by broulik into branch 'master'.

Update disk space info on refresh

When explicitly refreshing the view (e.g. F5) also refresh disk space info.
This would also allow us to raise the refresh interval somewhat.

Differential Revision: https://phabricator.kde.org/D15508

M  +1    -0    src/dolphinmainwindow.cpp
M  +5    -0    src/statusbar/dolphinstatusbar.cpp
M  +5    -0    src/statusbar/dolphinstatusbar.h
M  +7    -0    src/statusbar/spaceinfoobserver.cpp
M  +3    -0    src/statusbar/spaceinfoobserver.h
M  +7    -0    src/statusbar/statusbarspaceinfo.cpp
M  +2    -0    src/statusbar/statusbarspaceinfo.h

https://commits.kde.org/dolphin/391006130e31b80ecc55343f44bddaf06951c90f
Comment 2 Kai Uwe Broulik 2018-10-09 11:37:39 UTC
Git commit c69ecab9b70b988d9ee50f4e5480bf121fcc3057 by Kai Uwe Broulik.
Committed on 09/10/2018 at 11:37.
Pushed by broulik into branch 'master'.

[MountPointObserverCache] Update mounts less frequently

Even on fastest disks, filling up the disk in 10 seconds is unlikely.
Moreover, Plasma's "low disk" warning only polls every minute as well and Dolphin doesn't warn you about the fact that it's full.
Reduces needless wake ups of disks and network.

Differential Revision: https://phabricator.kde.org/D15507

M  +1    -1    src/statusbar/mountpointobservercache.cpp

https://commits.kde.org/dolphin/c69ecab9b70b988d9ee50f4e5480bf121fcc3057
Comment 3 Justin Zobel 2020-10-26 06:18:55 UTC
Harold/Kai is this still an issue? Have the commits fixed the issue?
Comment 4 Harald Sitter 2020-10-30 10:45:32 UTC
Yeah. Happens much less now.