Re: Directory/file browser as TreeView



On Thu, 28 Sep 2006 08:16:43 +0200
"Ratcliffe, Jeffrey (Peters)" <Jeffrey Ratcliffe External eads com> wrote:

True.

2. Major. It is slow to build the tree on huge directories with many
nested
    subdirs. You can click and nothing happens( while it builds a 600Meg
tree),
    and you will then start clicking twice, etc.  So it's kind of unusable
on big
    trees, but pretty neat for small ones.
    It would be nice if you could figure a way to only grab the first
level subdirs
    under a listing, and dynamically add to it. But I couldn't figure that
out. :-)
    I think that is what you are referring to in your text above.


No.
If you check out the code, the row-expanded callback does a 1-level look-ahead to populate subdirectories 
and therefore makes sure that there are triangles where there should be. And thus it is pretty quick, even 
on a large network (I checked).

Well, I just looked at the time to open my home directory, when the script
is run with / as the top of the tree.

When I navigated to /home/zentara, it took 12 seconds from the time I clicked
the triangle icon, to the point where it was finished.  That is unacceptable,
because I'm tempted to think I missed the small icon, and click multiple times.

When I use my canvas based model( on Tk) it was less than a second.

You may be doing a 1 level look ahead, but it isn't effective in reducing the time. 
It has something to do with the way the Treeview works.

Of course this depends on my home directory's subdir setup. For instance,
I have a perlplay subdir( which is very deeply nested ) which my Tk browser
takes maybe 2 seconds to open. Plus there are a few others like it. But your
Treeview lookahead seems to need to delve into them when I open /home/zentara,
and the accumulated delay adds up to 12 seconds.

When it would be better to have the delay occur only if I click on one of those
deeply nested subdirs.
This delay is the reason I switched to canvas.

But like I said, it's just for the sake of discussion, because maybe you can
figure a way to limit that recursion somehow with treeview.... I couldn't.

zentara

-- 
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]