You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan Fuhrmann <st...@alice-dsl.de> on 2010/04/24 22:20:19 UTC
[PATCH v3] Fix O(n) runtime in cache lookup, part 2/2
Hi there,
this is a revised version of the patch posted here:
http://svn.haxx.se/dev/archive-2010-04/0107.shtml
Changes:
* use the new svn_cache__set_pinned function
* remove other changes that accidentally got added
to the patch
-- Stefan^2.
[[[
Allow for cache entries to be access directly, i.e. without
prior copying. Use that to fix FSFS directory traversal
runtime from O(N^2) to O(n).
* subversion/libsvn_fs_fs/dag.c
(dir_entry_id_from_node): call the new, efficient
lookup function.
(svn_fs_fs__dag_dir_entry): implement the new
lookup function
(svn_fs_fs__dag_dir_entries, svn_fs_fs__dag_delete):
adapt to svn_fs_fs__rep_contents_dir signature change
* subversion/libsvn_fs_fs/dag.h
(svn_fs_fs__dag_dir_entry): declare new function
* subversion/libsvn_fs_fs/fs_fs.c
(svn_fs_fs__rep_contents_dir): add support for optionally
returning a pinned cache reference instead of a copy.
(svn_fs_fs__set_entry, write_final_rev): adapt to
svn_fs_fs__rep_contents_dir signature change
* subversion/libsvn_fs_fs/fs_fs.h
(svn_fs_fs__rep_contents_dir): add pin parameter
patch by stefanfuhrmann < at > alice-dsl.de
]]]