/ Check-in [7088d945]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Reduce the number of calls to sqlite3_realloc() made by fts3 when querying for position information of a term prefix.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7088d9450f403f12f67eed558e368573101245d6
User & Date: dan 2010-12-24 15:49:28
Context
2010-12-29
10:49
Fix some off-by-one errors in the comments for API functions create_function() and value_blob(). No changes to code or tests. check-in: 7ded90ba user: dan tags: trunk
2010-12-24
15:49
Reduce the number of calls to sqlite3_realloc() made by fts3 when querying for position information of a term prefix. check-in: 7088d945 user: dan tags: trunk
2010-12-22
21:48
Do not include <sys/mmap.h> if SQLITE_OMIT_WAL is defined. check-in: b82e85ec user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to ext/fts3/fts3_write.c.

2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
          fts3ColumnFilter(pFilter->iCol, &pList, &nList);
        }

        if( !isIgnoreEmpty || nList>0 ){
          nByte = sqlite3Fts3VarintLen(iDocid-iPrev) + (isRequirePos?nList+1:0);
          if( nDoclist+nByte>nAlloc ){
            char *aNew;
            nAlloc = nDoclist+nByte*2;
            aNew = sqlite3_realloc(aBuffer, nAlloc);
            if( !aNew ){
              rc = SQLITE_NOMEM;
              goto finished;
            }
            aBuffer = aNew;
          }







|







2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
          fts3ColumnFilter(pFilter->iCol, &pList, &nList);
        }

        if( !isIgnoreEmpty || nList>0 ){
          nByte = sqlite3Fts3VarintLen(iDocid-iPrev) + (isRequirePos?nList+1:0);
          if( nDoclist+nByte>nAlloc ){
            char *aNew;
            nAlloc = (nDoclist+nByte)*2;
            aNew = sqlite3_realloc(aBuffer, nAlloc);
            if( !aNew ){
              rc = SQLITE_NOMEM;
              goto finished;
            }
            aBuffer = aNew;
          }

install-sh became a regular file.

whitespace changes only

test/progress.test became executable.

whitespace changes only

tool/mkopts.tcl became executable.

whitespace changes only