Hi!
Current Subversion code translates file to temporary location and
after that checks they contents. It is slow and requires write access
to working copy directory, which is unacceptable in some situations.
Erik Huelsman implemented stream translation API which makes possible
translate files "on fly" without creating temporary files. In attached
patch I implemented file comparasion using this API. For me it
improves performance about two times on svn status!
See http://subversion.tigris.org/servlets/ReadMsg?listName=dev&msgNo=112578
It passes test suite on Windows and Debian Linux.
Might be I superfluously strict for self, but I don't sure in some
code cosmetics aspects in my patch:
* Is svn_subst_detranslated_stream good name for function?
* Is docstring for svn_subst_detranslated_stream enough and ok?
PS: There are several other places where temporary files can be eliminated.
[[
Use stream translation API for check file modifications.
* subversion/include/svn_subst.h
(svn_subst_detranslated_stream): New function declaration.
* subversion/libsvn_subr/subst.c
(detranslated_stream_special): Factor out implementation from
detranslate_special_file().
(detranslate_special_file): Use factored out detranslated_stream_special().
(svn_subst_detranslated_stream): New function. Returns stream which performs
translation file from working copy form to normal form. Handles
special files correctly.
* subversion/libsvn_wc/questions.c
(compare_streams): Helper for compare streams content.
(svn_wc__versioned_file_modcheck): If translation is required than
compare versioned and
base files using streamed translation API, instead of creating
temporary files.
]]
--
Ivan Zhakov
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Feb 26 16:59:34 2006