[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Use stream translation API for check file modifications.

From: Ivan Zhakov <chemodax_at_gmail.com>
Date: 2006-02-26 16:58:35 CET

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

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.