[frameworks-kio] [Bug 346403] kdialog freezes when startDir in --getopenfilename contains a lot of files

2017-05-13 Thread Martin Koller
https://bugs.kde.org/show_bug.cgi?id=346403

Martin Koller  changed:

   What|Removed |Added

 Status|CONFIRMED   |RESOLVED
 Resolution|--- |FIXED

--- Comment #14 from Martin Koller  ---
Fixed via https://phabricator.kde.org/D5774

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kio] [Bug 346403] kdialog freezes when startDir in --getopenfilename contains a lot of files

2017-04-17 Thread Martin Koller
https://bugs.kde.org/show_bug.cgi?id=346403

Martin Koller  changed:

   What|Removed |Added

 Status|UNCONFIRMED |CONFIRMED
 CC||kol...@aon.at
 Ever confirmed|0   |1

--- Comment #13 from Martin Koller  ---
I can confirm this with your example, using detail view, file preview NOT
activated. Using KIO from 5.32.0 on openSuse 42.2

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kio] [Bug 346403] kdialog freezes when startDir in --getopenfilename contains a lot of files

2017-03-23 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=346403

bchrist...@gmail.com changed:

   What|Removed |Added

 CC||bchrist...@gmail.com

--- Comment #12 from bchrist...@gmail.com ---
I would like to help get this bug's status changed to confirmed. The following
is enough to cause the bug to manifest:

$ mkdir ~/test
$ touch ~/test/{000..999}.txt
$ kdialog --getsavefilename ~/test/

Observations:

1) This causes a slowdown of 22–29 seconds on my i7 + SSD laptop while kdialog
eats up 100% of a core. If you are not seeing the slowdown, you can of course
add a few nines ;)

2) Subsequent runs of the kdialog line are always slow. 

3) The slowdown is always present, regardless of whether or not the "Show
Previews" button is pressed. 

4) Toggling the "Show Previews" button after the dialog becomes responsive does
NOT cause any additional delay (this is not just because my example involves
only empty files—it happens in real directories, too).

5) I can also confirm that another aspect of the bug is still present: If we
instead run 

$ kdialog --getsavefilename ~/

...THEN navigate to ~/test/ via the GUI, there is no slowdown whatsoever. I
feel that this is a key point because it shows that there is nothing inherently
slow about displaying a large number of files in kdialog.

Please take another look at this bug.



Arch Linux / Plasma 5.9.4 / Frameworks 5.32.0 / QT 5.8.0 / kdialog 1.0

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kio] [Bug 346403] kdialog freezes when startDir in --getopenfilename contains a lot of files

2016-11-16 Thread Angelo
https://bugs.kde.org/show_bug.cgi?id=346403

Angelo  changed:

   What|Removed |Added

 CC||angel...@gmail.com

--- Comment #11 from Angelo  ---
Seems i have same issue, in kdevelop 5.0.1 and also in previous version:

Step to reproduce:
1) if open a file in arch/arm/boot/dts/
2) close kdevelop
3) reopen it so that file is already visible
4) when the dialog file path already point to (a linux source tree) some file
in "arch/arm/boot/dts/" so if do open and same path is auto-selected

i have to wait at least 20 seconds with dialog as freezed, un-scrollable and
un-selectable.

I break gdb while waiting, the backtrace is below:

$ gdb kdevelop
GNU gdb (Debian 7.11.1-2) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from kdevelop...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/kdevelop 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffda57c700 (LWP 2485)]
[New Thread 0x7fffd8fc7700 (LWP 2486)]
[New Thread 0x7fffd120d700 (LWP 2488)]
[New Thread 0x7fffc97be700 (LWP 2489)]
[New Thread 0x7fffbdfde700 (LWP 2490)]
[New Thread 0x7fffbcb21700 (LWP 2501)]
Not loading plugin named "KDevNinjaBuilder" because it has been disabled!
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Permesso
negato
Invalid return type in method "core"
Invalid return type in method "extensions"
[New Thread 0x7fffb60e5700 (LWP 2573)]
[New Thread 0x7fffb58e4700 (LWP 2575)]
Not loading plugin named "KDevNinjaBuilder" because it has been disabled!
Invalid return type in method "core"
Invalid return type in method "extensions"
[New Thread 0x7fffb4c5b700 (LWP 2600)]
[New Thread 0x7fffa3fff700 (LWP 2601)]
[New Thread 0x7fffa37fe700 (LWP 2602)]
[New Thread 0x7fffa2ffd700 (LWP 2603)]
[New Thread 0x7fffa27fc700 (LWP 2604)]
[New Thread 0x7fffa1ffb700 (LWP 2605)]
[New Thread 0x7fffa17fa700 (LWP 2607)]
[New Thread 0x7fffa0ff9700 (LWP 2608)]
[New Thread 0x7fff83fff700 (LWP 2609)]
[New Thread 0x7fff837fe700 (LWP 2610)]
[Thread 0x7fff837fe700 (LWP 2610) exited]
^C
Thread 1 "kdevelop" received signal SIGINT, Interrupt.
0x7585c780 in operator new(unsigned long) () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0  0x7585c780 in operator new(unsigned long) () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x75d29722 in QUrl::detach() () from
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x75d29a97 in QUrl::setScheme(QString const&) () from
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x75d2c9f8 in QUrl::fromLocalFile(QString const&) () from
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x7131a875 in KFileItem::mostLocalUrl(bool*) const () from
/usr/lib/x86_64-linux-gnu/libKF5KIOCore.so.5
#5  0x7131f893 in ?? () from
/usr/lib/x86_64-linux-gnu/libKF5KIOCore.so.5
#6  0x7131fa0b in KFileItem::overlays() const () from
/usr/lib/x86_64-linux-gnu/libKF5KIOCore.so.5
#7  0x71947d98 in KDirModel::data(QModelIndex const&, int) const ()
   from /usr/lib/x86_64-linux-gnu/libKF5KIOWidgets.so.5
#8  0x75d96f29 in QSortFilterProxyModel::data(QModelIndex const&, int)
const ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x718f944c in
KFileItemDelegate::Private::decoration(QStyleOptionViewItem const&, QModelIndex
const&) const () from /usr/lib/x86_64-linux-gnu/libKF5KIOWidgets.so.5
#10 0x718f9998 in
KFileItemDelegate::Private::initStyleOption(QStyleOptionViewItem*, QModelIndex
const&) const () from /usr/lib/x86_64-linux-gnu/libKF5KIOWidgets.so.5
#11 0x718fa2ea in KFileItemDelegate::sizeHint(QStyleOptionViewItem
const&, QModelIndex const&) const ()
   from /usr/lib/x86_64-linux-gnu/libKF5KIOWidgets.so.5
#12 0x769b5e49 in QTreeViewPrivate::widthHintForIndex(QModelIndex
const&, int, QStyleOptionViewItem const&, int) const () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x769b8dcf in QTreeView::sizeHintForColumn(int) const ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x7698a5d6 in ?? () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

[frameworks-kio] [Bug 346403] kdialog freezes when startDir in --getopenfilename contains a lot of files

2016-10-17 Thread Nicolas Frattaroli via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=346403

--- Comment #10 from Nicolas Frattaroli  ---
Actually, I already have previews turned off in the folders in which this
happens. The fact that it happens inconsistently would also indicate that the
problem is something else.

I'll try to mess around with gdb some more when I get the time to.

-- 
You are receiving this mail because:
You are watching all bug changes.


[frameworks-kio] [Bug 346403] kdialog freezes when startDir in --getopenfilename contains a lot of files

2016-10-14 Thread Simon Andric via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=346403

Simon Andric  changed:

   What|Removed |Added

 CC||simonandr...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.


[frameworks-kio] [Bug 346403] kdialog freezes when startDir in --getopenfilename contains a lot of files

2016-10-13 Thread David Faure via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=346403

--- Comment #9 from David Faure  ---
Thanks for the backtraces. They don't necessarily indicate "hanging in
libharfbuzz".
More likely, KFilePreviewGenerator::Private::dispatchIconUpdateQueue() is
triggering dataChanged for one item at a time, just like in the bug I fixed.

This confirms my suspicion that it's related to previews. I don't mean the side
panel, I mean the icons themselves turning into a preview of the file (e.g. for
images, you see the image in small instead of the generic "this is an image"
icon). To confirm this, you can try again without previews enabled (although
the actual action of disabling previews will be slow until you get my bugfix --
better do that in a small folder before going back to the big folder).

The way to find out if it's hanging in harfbuzz is simple: once you're in gdb,
do
break KDirModel::itemChanged
cont
and you should see that it does continue, and it will hit itemChanged again,
and again (once per file).
This goes back to the event loop between files though, i.e. it's supposed to be
happening "in the background" while you can still use the dialog. That's
definitely what I see here.

In /usr/bin the issue is: most files don't have an extension, so mimetype
determination has to happen (by reading the contents of the file), and this too
happens delayed (in the background), from the same KFilePreviewGenerator class
(yes, it does more than the name indicate, it does mimetype determination and
previews). So it's likely the same issue, just triggered slightly differently.
I expect it to make the app more busy in fact, given that previews are
generated by a separate process (kioslave) so in theory the app (kdialog here)
should be waiting for the preview to come in (just a little bit).

Anyhow, I'm a bit puzzled because when previews are generated, then yes it's
expected that the view will re-layout one item at a time. It's what happens
here, it's what happens for you... but somehow the user visible behaviour seems
different? Or my machine is too powerful for me to find it slow

-- 
You are receiving this mail because:
You are watching all bug changes.


[frameworks-kio] [Bug 346403] kdialog freezes when startDir in --getopenfilename contains a lot of files

2016-10-13 Thread David Faure via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=346403

--- Comment #8 from David Faure  ---
Git commit 09cd8420e6c901a482c346fdaf4bc1cc38587646 by David Faure.
Committed on 13/10/2016 at 16:52.
Pushed by dfaure into branch 'master'.

Major performance improvement when turning previews off in the file dialog.

Added a method for this KDirModel so it can emit dataChanged only once
(or once per dir in a tree) rather than for every item.
REVIEW: 129159

M  +0-10   src/filewidgets/kdiroperator.cpp
M  +1-24   src/filewidgets/kfilepreviewgenerator.cpp
M  +27   -1src/widgets/kdirmodel.cpp
M  +7-0src/widgets/kdirmodel.h

http://commits.kde.org/kio/09cd8420e6c901a482c346fdaf4bc1cc38587646

-- 
You are receiving this mail because:
You are watching all bug changes.


[frameworks-kio] [Bug 346403] kdialog freezes when startDir in --getopenfilename contains a lot of files

2016-10-12 Thread Nicolas Frattaroli via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=346403

--- Comment #7 from Nicolas Frattaroli  ---
Created attachment 101546
  --> https://bugs.kde.org/attachment.cgi?id=101546=edit
A different backtrace from another hanging kdialog process

Sorry for the many successive comments, but here's another backtrace, this time
hanging in libharfbuzz.

It looks like this might be an issue with my system's fonts, which would
explain why you might not be able to reproduce it.

-- 
You are receiving this mail because:
You are watching all bug changes.


[frameworks-kio] [Bug 346403] kdialog freezes when startDir in --getopenfilename contains a lot of files

2016-10-12 Thread Nicolas Frattaroli via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=346403

--- Comment #6 from Nicolas Frattaroli  ---
Created attachment 101545
  --> https://bugs.kde.org/attachment.cgi?id=101545=edit
gdb backtrace of interrupted process while it hangs

Here's the gdb backtrace of a hanging kdialog process (built as debug), however
kde frameworks and Qt aren't built with debug symbols because Arch Linux
doesn't provide pre-compiled debug packages, I'll try to build everything with
debug symbols someday, but since this will probably take a long time I haven't
done so yet.

-- 
You are receiving this mail because:
You are watching all bug changes.


[frameworks-kio] [Bug 346403] kdialog freezes when startDir in --getopenfilename contains a lot of files

2016-10-12 Thread Nicolas Frattaroli via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=346403

--- Comment #5 from Nicolas Frattaroli  ---
Correction: kdialog now seems to hang again, so seemingly this isn't
consistently reproducible.
It still only hangs if the folder has a lot of files in it, though.
After a few tries, I've also gotten it to hang on my /usr/bin/ (5490 items), so
it seems the filetype does not matter.

-- 
You are receiving this mail because:
You are watching all bug changes.


[frameworks-kio] [Bug 346403] kdialog freezes when startDir in --getopenfilename contains a lot of files

2016-10-12 Thread Nicolas Frattaroli via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=346403

--- Comment #4 from Nicolas Frattaroli  ---
This is with the side-panel preview on. The folder is full of mainly PNG
images. The images are sorted by filename.

I've just tried again with kdialog and compared it to a minimal file widget
application I wrote based on the kio tests, and while kdialog now seems to no
longer hang (although this isn't git HEAD), the test application still does.

-- 
You are receiving this mail because:
You are watching all bug changes.


[frameworks-kio] [Bug 346403] kdialog freezes when startDir in --getopenfilename contains a lot of files

2016-10-12 Thread David Faure via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=346403

David Faure  changed:

   What|Removed |Added

 CC||fa...@kde.org,
   ||kdelibs-b...@kde.org
Product|kfile   |frameworks-kio
   Assignee|br...@frogmouth.net |fa...@kde.org
  Component|general |general

--- Comment #3 from David Faure  ---
The right product is kio, reassigning.

I can reproduce major slowness when clicking on the button to turn previews off
in the file dialog, and I have just fixed that. However I don't see the
slowness otherwise. Is this with previews on or off ? What type of files, in
terms of extension and content ?

-- 
You are receiving this mail because:
You are watching all bug changes.