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

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

[Octave-bug-tracker] [bug #57439] handles to private functions may fail


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #57439] handles to private functions may fail after "clear functions"
Date: Sat, 2 May 2020 10:56:12 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0

Follow-up Comment #52, bug #57439 (project octave):

I tried with the attached patch that effectively removes all calls of "stat"
in "find_private_fcn_file" on Windows.
I don't see a noticeable difference with or without it in the times reported
by "time make check" on Linux.
However, running "__run_test_suite__" on Windows still is very slow.

I attached the profiler "Very Sleepy CS" [1] (which is a very handy tool btw)
to Octave while it executed the test suite. It turns out that the biggest slow
down seems to come from calling "canonicalize_file_name" frequently from
load_path::package_info::find_private_fcn in load-path.cc. I guess we cannot
remove "canonicalize_file_name" from that function, or can we?

Looking at the main contributors in "canonicalize_file_name", it turns out
that especially the function calls that should lead to uniform letter casing
on Windows have the longest execution time.
I added the "canonicalization" of the letter case (and conversion to long file
names) to solve bug #56267:
http://hg.savannah.gnu.org/hgweb/octave/rev/def608acdfa9

Maybe we could make that part of "canonicalize_file_name" optional. Or
probably better: we should use a different function where we need "canonical"
letter case in file names and paths on Windows and remove that part of
"canonicalize_file_name" altogether...
One possibility might be to internally store paths on Windows in lower case
and only "prettify" the letter case close to the user interface (i.e. never
for the use cases in load-path.cc). Mapping the strings to lower case is
probably much faster than querying the correct casing from the file system.
I'm not sure what to do about short and long file names though. Maybe that
won't be an issue here because we are looking for function files which should
always be the long file name variant.
Any opinions?

[1]: http://www.codersnotes.com/sleepy/

(file #48985)
    _______________________________________________________

Additional Item Attachment:

File name: bug57439_avoid_stat.patch      Size:12 KB
    <https://savannah.gnu.org/file/bug57439_avoid_stat.patch?file_id=48985>



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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