tramp-devel
[Top][All Lists]
Advanced

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

Possible speedup?


From: Skip Montanaro
Subject: Possible speedup?
Date: Mon, 17 Nov 2003 08:52:02 -0600

Awhile ago there was a thread in which I participated about slowness.  I
think I've figured out the main cause.  Previously I was using a version of
tramp which was silent when checking file attributes (2.0.35?).  I redid my
XEmacs installation recently and wound up accidentally falling back to tramp
2.0.12.  Tramp is now quite chatty during that period of time where it used
to be silent, telling me about all the file attribute checks it's performing
for me.  Here's some view-lossage output (I think it reads bottom-to-top):

    tramp: file attributes with perl: 
/[rsync/manatee.mojam.com]/home/www/htdocs/production/demodiaries/rightToc
    Wrote 
/[rsync/manatee.mojam.com]/home/www/htdocs/production/demodiaries/rightToc
    tramp: file attributes with perl: 
/[rsync/manatee.mojam.com]/home/www/htdocs/production/demodiaries/rightToc
    tramp: Transferring file using `rsync'...done
    tramp: Writing tmp file using `rsync'...
    tramp: True name of 
`/[rsync/manatee.mojam.com]/home/www/htdocs/production/demodiaries/rightToc' is 
`/home/www/htdocs/production/demodiaries/rightToc'
    tramp: file attributes with perl: 
/[rsync/manatee.mojam.com]/home/www/htdocs/production/demodiaries/rightToc
    tramp: Check /home/www/htdocs/production/demodiaries/rightToc
    tramp: file attributes with perl: 
/[rsync/manatee.mojam.com]/home/www/htdocs/production/demodiaries
    tramp: Check /home/www/htdocs/production/demodiaries
    tramp: file attributes with perl: 
/[rsync/manatee.mojam.com]/home/www/htdocs/production
    tramp: Check /home/www/htdocs/production
    tramp: file attributes with perl: /[rsync/manatee.mojam.com]/home/www/htdocs
    tramp: Check /home/www/htdocs
    tramp: file attributes with perl: /[rsync/manatee.mojam.com]/home/www
    tramp: Check /home/www
    tramp: file attributes with perl: /[rsync/manatee.mojam.com]/home
    tramp: Check /home
    tramp: Finding true name for 
`/[rsync/manatee.mojam.com]/home/www/htdocs/production/demodiaries/rightToc'

As you can see, the number of file-attribute calls it makes is proportional
to the depth of the path to the file being saved.

Would it be possible to collapse that into a single "super-file-attributes"
call which did all of the nested file-attributes calls during a single
request?  It could then pass all that information back as an aggregate where
the normal "file-attributes" function can extract them.

I'm sure there are other ways of accomplishing this.  I don't understand the
tramp code well enough to speculate, but it seems like it would be a big
improvement over the status quo.

On a related note, why is using ls to fetch file attributes not preferred
over using perl?  I suspect it would be faster.

-- 
Skip Montanaro
Got gigs? http://www.musi-cal.com/
          http://www.mojam.com/
Got spam? http://spambayes.sf.net/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]