[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59711] Performance of `cd` is bad on Windows
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #59711] Performance of `cd` is bad on Windows |
Date: |
Mon, 4 Jan 2021 05:21:25 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 Edg/87.0.664.66 |
Follow-up Comment #13, bug #59711 (project octave):
IIUC, the canonical file name is used as a unique key for the private function
file map.
There is no real reason this key has to be the canonical file name. Any other
key would also do as long as it identifies the files in the map uniquely.
The attached patch adds a new type that might be used to identify files
uniquely. For this, it also adds a function that queries the device id and
inode (with `stat`) on Linux, or the volume serial number and file index (with
`GetFileInformationByHandle`) on Windows.
Both function calls should be fast on their respective platforms.
A "simple" call to `stat` might also be slightly more efficient than calling
`canonicalize_file_name` on Linux.
If these ids (instead of the canonical file names) are used as the keys in the
private function file map, `pkg load ltfat` "feels" faster on my system. (But
it wasn't as slow as reported by others here in the first place here. So, it
is hard to tell the difference.)
`__run_test_suite__` also finishes without errors. But I haven't done much
more testing yet.
Does anyone know whether it is save to assume that a combination of device id
and inode uniquely identifies a file?
Might hard links cause problems?
What about file systems on remote systems (network shares)?
Anyway, this patch changes the API. So, if accepted at all, it should go on
the default branch.
(file #50641)
_______________________________________________________
Additional Item Attachment:
File name: bug59711_load-path_oct_uid.patch Size:5 KB
<https://file.savannah.gnu.org/file/bug59711_load-path_oct_uid.patch?file_id=50641>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59711>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #59711] Performance of `cd` is bad on Windows,
Markus Mützel <=
- [Octave-bug-tracker] [bug #59711] Performance of `cd` is bad on Windows, Nicholas Jankowski, 2021/01/04
- [Octave-bug-tracker] [bug #59711] Performance of `cd` is bad on Windows, Rik, 2021/01/04
- [Octave-bug-tracker] [bug #59711] Performance of `cd` is bad on Windows, Markus Mützel, 2021/01/17
- [Octave-bug-tracker] [bug #59711] Performance of `cd` is bad on Windows, Rik, 2021/01/19
- [Octave-bug-tracker] [bug #59711] Performance of `cd` is bad on Windows, Nicholas Jankowski, 2021/01/19
- [Octave-bug-tracker] [bug #59711] Performance of `cd` is bad on Windows, Markus Mützel, 2021/01/19
- [Octave-bug-tracker] [bug #59711] Performance of `cd` is bad on Windows, Rik, 2021/01/19