knpatel401 / filetree

filetree is an emacs package for displaying and operating on a file list as a file tree, and for maintaining individual notes for files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slow to render when Tramp buffers are open

skeezix opened this issue · comments

I often operate with 2 or 3 Tramp buffers open; when this is the case, using filetree-show-cur-buffers takes a long time to come up. (ie: seems linear relative to number of Tramps open, and responseiveness of the Tramp servers.) Some of the servers I'm on are really slow or multiple hops away.

Just a quick report, I didn't do any digging yet (sorry); ie: I shoudl rol back to an older version and see, or try to figure out the elisp profiling stuff. (forgotten it all :)

I'm betting its looking up the modes, file sizes, determining icon type (unless thats purely regexp based), thats taking forever

Request; maybe check if non-local buffer, and in those cases skip pulling extra metadata. Just write 'remote file' or something. (Or perhaps a variable to .. filetree-fetch-meta-for-remote-files, default nil perhaps?)

Thanks for the info.

I'll look into it from my side, but if you get a chance, can you please try a couple quick experiments to try to track down where the delay is coming from:

  • First, remove the side info (i.e., pressing "[" so it's the nil viewset) and disable the icons (pressing ";"), then exit, and then call filetree-show-cur-buffers--do you still see a long delay?
  • If you don't see a delay in the above case, then enable the icons, then exit, and then call filetree-show-cur-buffers again. Do you see a delay in this case?
  • Finally, if you don't see a delay in the above cases, enable the additional file info on the left (using "]"), then exit, and call filetree-show-cur-buffers again.

Thanks!

FYI, I checked in a change into master (65ec7d5) that let's you enable/disable obtaining file info for remote files via a config variable (filetree-show-remote-file-info). By default the variable is set to nil (disabling info for remote files).

Let me know if that improves the slow rendering issues.

Thanks!

Nice, thanks! I opened up 2 tramps as a quick test, and the window still came up instantly. Pretty sure it was the checking for modes and file sizes that was the culprit. (Seen it many times.. many packages fall down when Trump buffers are at play.)

And super thanks for being so attentive :)