Subject: Re: [boost] [filesystem] temp_directory_path() behavior on Windows
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-02-03 19:32:37
On 3 Feb 2015 at 18:54, Rob Stewart wrote:
> Given all of the restrictions you've enumerated, it would seem that the
> right behavior is actually to test the existence of a possible result
> and the caller's permission to use it before returning.
I think it's faster to iterate all ten in that order actually. The
big problem with caching results is that if your temp drive is on a
network share, it can come and go over the lifetime of your process.
In the end, temp files are slow on Windows, as is opening file
handles at all actually. That's because on NT you were never supposed
to use temp files when you have a NT kernel namespace to use (i.e.
named section objects). Unfortunately, those don't play well without
a bit of work with iostreams, fopen et al.
-- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk