/[Apache-SVN]
ViewVC logotype

Revision 1586947


Jump to revision: Previous Next
Author: stefan2
Date: Sun Apr 13 09:45:03 2014 UTC (10 years, 7 months ago)
Changed paths: 3
Log Message:
Using error objects to control the control flow in non-errorneous
cases is bad style. Moreover, it is very expensive as the condition
occurs frequently and the error objects carry their own pools,
created from a thread-safe root pool. The localization of error
messages makes things even worse.

dag_open should not return an error to open_path if the dirent
cannot be found, pass a NULL node back instead.  This eliminates
about 50% of all transitional error objects during log-y operations.
As there are only 2 callers of dag_open, they are easy to adapt.

This also slightly improves MT scalability of the FSFS DAG traversal
code as the global pool allocator uses a process-wide mutex.

* subversion/libsvn_fs_fs/dag.h
  (svn_fs_fs__dag_clone_root): Document the new error behavior.

* subversion/libsvn_fs_fs/dag.c
  (svn_fs_fs__dag_clone_child): This caller actually wants an error,
                                thus we create it here.
  (svn_fs_fs__dag_open): Return NULL if entry cannot be found.

* subversion/libsvn_fs_fs/tree.c
  (open_path): Replace error meddling with a check for NULL.

Changed paths

Path Details
Directorysubversion/trunk/subversion/libsvn_fs_fs/dag.c modified , text changed
Directorysubversion/trunk/subversion/libsvn_fs_fs/dag.h modified , text changed
Directorysubversion/trunk/subversion/libsvn_fs_fs/tree.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26