octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #60387] ftp class method 'dir' extremely slow


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #60387] ftp class method 'dir' extremely slow
Date: Tue, 13 Apr 2021 14:32:19 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #10, bug #60387 (project octave):

Yeah, it is complicated.  It needed to be a class for compatibility.  It
needed to use an object to manage the ftp connection state that could be
copied (the handle/rep implementation) so that the handle could be passed
around.  This was in the days before std::shared_ptr and so on.

Initially, the code to interact with cURL was directly in the urlwrite.cc file
in libinterp but I moved it to a separate class in liboctave so that it might
be used separately from the DEFUNs.

I didn't write the initial code that works with cURL.  But I guess
get_fileinfo function was written to just use the cURL functions in a kind of
brute-force way that just iterates over the files.  Looking again at the cURL
docs, I don't see a faster way to do it using cURL function calls other than
to parse the text output of a DIR command because it appears that each query
for file size and modification time requires a separate ftp request.  That
probably also explains why it takes significantly different amounts of time to
get the info about the "ftp://ftp.gnu.org/gnu/emacs"; directory.  We are really
looking at the network response time, not how fast Octave can run through the
loop over the list of files.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60387>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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