new editor interface?
From: Greg Stein <gstein_at_lyra.org>
Date: 2002-02-21 16:22:27 CET
Ben Collins and I were doing some imports, adds, commits, etc last night and
Next up was 'commit'. The performance was just such a dog (with all the
Some initial investigation showed the standard culprit: file and dir batons
To put this problem to a final rest, I've drafted a new editor interface. I
* rather than passing 'svn_stringbuf_t *name', we pass both a name and a
* when a baton is to be constructed, we pass a pool to use for that baton
* close_directory() and close_file() are omitted. Instead, register a
* property funcs take the "new style" types, rather than stringbuf
Note that this interface is a tiny bit tougher for the caller: both name and
However, this interface also greatly eliminates the potential for poor pool
It is also possible to write a "mapper" which can map from the old call
[ we could also write a reverse-mapper allowing drivers to switch, yet still
This gives us a phased approach, where we get the benefits of the new
Thoughts?
Cheers,
-- Greg Stein, http://www.lyra.org/ typedef struct { svn_error_t *(*set_target_revision) (void *edit_baton, svn_revnum_t target_revision); svn_error_t *(*open_root) (void *edit_baton, svn_revnum_t base_revision, apr_pool_t *dir_pool, void **root_baton); svn_error_t *(*delete_entry) (const char *name, const char *path, svn_revnum_t revision, void *parent_baton); svn_error_t *(*add_directory) (const char *name, const char *path, void *parent_baton, const char *copyfrom_path, svn_revnum_t copyfrom_revision, apr_pool_t *dir_pool, void **child_baton); svn_error_t *(*open_directory) (const char *name, const char *path, void *parent_baton, svn_revnum_t base_revision, apr_pool_t *dir_pool, void **child_baton); svn_error_t *(*change_dir_prop) (void *dir_baton, const char *name, const svn_string_t *value); svn_error_t *(*add_file) (const char *name, const char *path, void *parent_baton, const char *copy_path, svn_revnum_t copy_revision, apr_pool_t *file_pool, void **file_baton); svn_error_t *(*open_file) (const char *name, const char *path, void *parent_baton, svn_revnum_t base_revision, apr_pool_t *file_pool, void **file_baton); svn_error_t *(*apply_textdelta) (void *file_baton, svn_txdelta_window_handler_t *handler, void **handler_baton); svn_error_t *(*change_file_prop) (void *file_baton, const char *name, const svn_string_t *value); svn_error_t *(*close_edit) (void *edit_baton); svn_error_t *(*abort_edit) (void *edit_baton); } svn_delta_editor_t; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org For additional commands, e-mail: dev-help@subversion.tigris.orgReceived on Sat Oct 21 14:37:09 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.