Skip to content

Netshare performance optimizations

This patch adds a configuration module with several options to improve performance on network drives. This is achieved by switching off individual time-consuming operations including resolving symlinks, determining free space, finding manually mounted drives, checking for .desktop, .directory or .hidden files, determining the MIME type or filesystem type, etc. when acting on freely selectable paths.

These operations doing expensive system calls like stat(), statfs() or Qt functions like QFileInfo.canonicalFilePath() are normally quite useful and their performance impact on local drives is neglectable but on network drives they can make the difference between usable and unusable.

This can be especially useful if your network connection is slow or your file server is under heavy load. Navigating a network share containing lots of files and directories using dolphin can be slow or freeze dolphin for several seconds, too.

The options here can control optimizations in kio, kconfigwidgets, kcoreaddons, kwidgetaddons, dolphin, kate and ktexteditor. See patches there.

The configuration module uses the new KNetsharePerformance class from kcoreaddons.

These optimizations (with different configuration) are used on the LiMux workstations and (VPN) laptops of the city of Munich. Kai-Uwe Broulik identified many of the points where program execution can come to a standstill.

At corporate networks, a configuration for each user (~/.config/netshare_performance) could be created by custom login scripts, depending on the user's shares.

Test: Mount network shares from heavy loaded file servers and/or via slow network connections. E.g. connect your computer to a mobile phone accesspoint with weak reception or use tools like wondershaper to limit bandwidth.

Using Dolphin navigate through deep directory trees containing many files and directories on your network shares. Open text documents by double clicking. Navigate in file dialogs (open, save as) from kate, okular, etc.

Open the Netshare performance module in system settings, enable the optimizations and enter the mountpoints of your network shares into the Paths list. Create a directory /home/youruser/netshares where you create symlinks to your network shares. Enter /home/youruser/netshares into the Symlink Paths list.

Compare performance with optimizations enabled/disabled. Enable/disable individual options, watch performance and different behaviour, see whatsthis help.

Screenshots of the kcm:

screenshot_qml1_disabled

screenshot_qml2_some

screenshot_qml3_more

screenshot_qml4_many

screenshot_qml5_most

screenshot_qml6_all

screenshot_qml7_all_cache

screenshot_qml8_all_cache_info

Edited by Robert Hoffmann

Merge request reports

Loading