Author: stefan2 Date: Mon Aug 9 18:47:41 2010 New Revision: 983770 URL: http://svn.apache.org/viewvc?rev=983770&view=rev Log: When reading cache-able full text from the DB, pre-allocate the respective buffer to the expected size of the full text.
* subversion/libsvn_fs_fs/fs_fs.c (rep_read_get_baton): allocate just as much space for the fulltext buffer as will probably be needed to hold it. Modified: subversion/branches/performance/subversion/libsvn_fs_fs/fs_fs.c Modified: subversion/branches/performance/subversion/libsvn_fs_fs/fs_fs.c URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_fs_fs/fs_fs.c?rev=983770&r1=983769&r2=983770&view=diff ============================================================================== --- subversion/branches/performance/subversion/libsvn_fs_fs/fs_fs.c (original) +++ subversion/branches/performance/subversion/libsvn_fs_fs/fs_fs.c Mon Aug 9 18:47:41 2010 @@ -3188,7 +3188,8 @@ rep_read_get_baton(struct rep_read_baton b->filehandle_pool = svn_pool_create(pool); if (fulltext_cache_key) - b->current_fulltext = svn_stringbuf_create("", b->filehandle_pool); + b->current_fulltext = svn_stringbuf_create_ensure(rep->expanded_size, + b->filehandle_pool); else b->current_fulltext = NULL;