Re: Why does Cygwin always use absolute paths instead of OBJECT_ATTRIBUTES.RootDirectory?

"Knut St. Osmundsen via Cygwin" <[email protected]>
Newsgroups gmane.os.cygwin
Message-ID <[email protected]>
Experiments 10-20 years back in a different project, suggested there wasn’t any real performance gain with NTFS volumes when setting the RootDirectory handle. If I recall correctly, I think NTFS at the time would be reconstructing the volume-relative path and do the regular opening on it.  Things may have changed since then, though. I would’ve be quite curious to know how current windows performs

Anyway, it conceptually makes perfect sense to use the RootDirectory option when possible. I think we did so in the aforementioned project despite the lack of performance gains.

Cheers,
 Knut.

> On 4. Feb 2026, at 22:18, Dan Shelton via Cygwin <[email protected]> wrote:
> 
> Hello,
> 
> Why does Cygwin always use absolute paths instead of
> OBJECT_ATTRIBUTES.RootDirectory in NtOpenFile(),
> NtSetInformationFile() for rename and hardlinks
> 
> This slows down Cygwin path lookups a lot, and with lots of path
> elements each lookup with a relative RootDirectory might be a lot
> faster, e.g. for openat(), linkat(), renameat().
> 
> Dan
> --
> Dan Shelton - Cluster Specialist Win/Lin/Bsd
> 
> --
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
> 


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.