Bug 351846

Summary: Resize columns is slow; caused by saving view-properties (?)
Product: [Applications] dolphin Reporter: Torben Schiffke <hoerbert>
Component: view-engine: details modeAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: chrno-sphered, frank78ac, lee295012
Priority: NOR    
Version: 16.12.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 15.08.1
Sentry Crash Report:

Description Torben Schiffke 2015-08-27 12:41:01 UTC
When changing the column-sizes in dolphins detail-view (e.g. the "Filename" or "Size"-columns) dolphin only reacts very slow.

If you open dolphin from a terminal and you resize the columns, the line
org.kde.dolphin: Saving view-properties to "/home/[username]/[foldername]"
gets printed many times while changing the width (where [username] is my username and [foldername] is the name of the directory for which I change the column-width).

And yes: the option for storing the view for each folder separately is activated. I'm not sure, if this option affects this behaviour. Switching it of does not solve this problem for me, but in the arch-forum someone reports that he does not have this problem and he turned this option off.
(Link: https://bbs.archlinux.org/viewtopic.php?id=201550)

The Version is 15.08.0 (which can not be selected in the version-select-box)

Reproducible: Always

Steps to Reproduce:
1. Open dolphin
2. Switch the view to "detail-view"
3. Activate the option, for saving the view for each folder separately (perhaps not necessary)
4. Change the size of any of the columns

Actual Results:  
The resize-action is very slow, probably because the new column-size is saved many times, while still resizing the column.

Expected Results:  
The resize-action should be much faster. Probably it would make sense, to only save the new column-width, when the resizing is done (don't know the technical details/internals though).
Comment 1 Torben Schiffke 2015-08-28 11:43:51 UTC
For me this is reproducible in a kubuntu-VM (15.10 (Wily) Beta) with the same version of dolphin.
Comment 2 Frank Reininghaus 2015-08-29 19:20:51 UTC
Thanks for the bug report! I can confirm this. It would probably be better to save the new settings to disk with a small delay, such that multiple writes to the same file in quick succession could be avoided.
Comment 3 Frank Reininghaus 2015-08-29 20:04:55 UTC
Proposed fix at https://git.reviewboard.kde.org/r/124984/

It waits until the mouse button is released before the new column width is written to disk.
Comment 4 Frank Reininghaus 2015-09-03 18:32:45 UTC
Git commit 5ce01c864f4ab9848a54ee982f6ac18e63f04773 by Frank Reininghaus.
Committed on 03/09/2015 at 18:26.
Pushed by freininghaus into branch 'Applications/15.08'.

Only store modified columns widths after the mouse button was released

This prevents that the new widths are written to disk multiple times in
quick succession, which can make column resizing quite slow.
REVIEW: 351846
FIXED-IN: 15.08.1

M  +2    -0    src/kitemviews/kitemlistheader.cpp
M  +7    -0    src/kitemviews/kitemlistheader.h
M  +8    -0    src/kitemviews/private/kitemlistheaderwidget.cpp
M  +7    -0    src/kitemviews/private/kitemlistheaderwidget.h
M  +3    -5    src/views/dolphinview.cpp
M  +1    -1    src/views/dolphinview.h

http://commits.kde.org/dolphin/5ce01c864f4ab9848a54ee982f6ac18e63f04773