andreikop / enki

A text editor for programmers
http://enki-editor.org
GNU General Public License v2.0
161 stars 38 forks source link

Works slow with gvfs #190

Closed yajo closed 10 years ago

yajo commented 10 years ago

Hi there!

When I have an SFTP folder mounted, if I navigate through it with the Enki file tree, it gets very slow displaying the folder contents, especially if there are a few hundred.

I thought it could be a network problem, but then i checked and navigating those with Nautilus is very faster.

I use Fedora 20 and Gnome 3.10.2.

Thanks!

andreikop commented 10 years ago

Could you please test if this light Enki version also is slow?

#!/usr/bin/env python

import sys

from PyQt4.QtGui import QApplication, QTreeView, QFileSystemModel

app = QApplication(sys.argv)
tree = QTreeView()
model = QFileSystemModel(tree)
model.setRootPath('/')
tree.setModel(model)

tree.show()
app.exec_()
yajo commented 10 years ago

That one seems to work fine. However I cannot test it right now in the exact same environment, let me try later.

andreikop commented 10 years ago

Waiting while you tested code above and Enki on same environment

yajo commented 10 years ago

Sorry for the delay. I have tested it in the same environment, and it is as slow as Enki (~30 seconds). The target folder has 196 subfolders, and all I do is click on the [+] sign. The server has a very limited bandwidth (~3.5KiB/s).

Listing the exact same folder in Nautilus takes ~18s (40% faster). Other times it got ~1s, but maybe it was because it readed it from some sort of cache, and that tricked me. Now I see that the difference is not that much, and seems to be Qt bug in any case.

andreikop commented 10 years ago

I'm closing this bug, because it doesn't worse rewriting QFileSystemModel. I can do something more useful in this time. Let's hope Qt will become quicker sometimes.