When locating the working copy from a path we try to open the SQLite database in every directory. SQLite doesn't optimize for this and does a lot of housekeeping (memory wise and io wise) with the assumption that you really want to open an existing file or create a new database.
When locating the working copy from a path we try to open the SQLite database
in every directory. SQLite doesn't optimize for this and does a lot of
housekeeping (memory wise and io wise) with the assumption that you really
want to open an existing file or create a new database.

Performing a simple status check avoids all this pain, and improves performance
for every case except opening the working copy root itself.

* subversion/libsvn_wc/wc_db_util.c
  (svn_wc__db_util_open_db): If not creating a new wc.db, perform a filestat
    before opening the database.


git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1306334 13f79535-47bb-0310-9956-ffa450edef68

YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion