> * subversion/bindings/javahl/native/JNIUtil.cpp
> (JNIUtil::preprocessPath): Remove a gigantic Windows only performance
> penalty by using the always correct svn_path_internal_style()
> of the hidden breaking apr_filepath_merge with
> that only did validation on Windows.
Until recently some parts of Subversion used apr_filepath_merge with the
APR_FILEPATH_TRUENAME flag all over the place. (It currently only uses it
for paths passed to svn via the commandline where it is actually usefull for
catching user typos).
Using this method is VERY VERY expensive on Windows. Our (and your) code
should canonicalize paths only once. Exactly when passed from an untrusted
source and after that assume that paths are canonical (or at least correctly
(Apr ignores this flag on all OSs except Windows, so as Linux developer you
would never know.)
I would recommend that other subversion client developers review their code
to make sure they don't accidentally call this same method without realizing
that this is expensive and you can get a fILE back when you gave the method
In 99.9% of all cases this normalization does nothing, except for costing a
lot of time; in that other 0.1 percent (where the file on disk has another
casing than subversion thinks it has), it makes it impossible for you to
call subversion commands on the administratively managed file, as it would
automatically 'repair' your 'File' to 'fILE'.
Thanks for your attention,
Received on 2009-02-07 14:36:32 CET