[darcs-users] Handling relative directories
Petr Rockai
me at mornfall.net
Tue Apr 6 21:15:06 UTC 2010
Ganesh Sittampalam <ganesh at earth.li> writes:
> What about Windows?
>
> In any case, hidden behind a suitable library, we can just use absolute paths
> to support threading without much cost, so I don't think there is any need for
> such a compromise, unless we really want to minimise the number of possible
> configurations.
You are probably right, and it won't necessarily increase the number of
configurations either.
1: - threaded + openat
- threaded + absolute paths
- (non-threaded + cwd)
or
2: - threaded + openat
- unthreaded + cwd
... I guess the downside of 1 with 2 options only is that on the
"absolute paths" platforms where threading is unused, we always pay a
performance penalty. Hard to tell if this is a real problem though. With
a good-enough implementation, this may be a non-issue. It would help a
lot if we had a good, fast TLS in Haskell... (I suspect that wrapping
everything in a StateT is not an option here, unfortunately...)
I assume that a thread-local bytestring for a "working path" that would
have a constant absolute prefix and a variable suffix (blitted on
demand) would be fairly inexpensive. Can't do anything about the other
part of the cost (the extra in-kernel directory lookups associated with
absolute paths). I guess.
Yours,
Petr.
More information about the darcs-users
mailing list