/ Check-in [f480582c]
Login

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

Overview
Comment:Remove an unused C-preprocessor macro. No functional changes to the code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f480582ccae0e9a917d4523191025bd16016ba64
User & Date: drh 2014-09-23 23:12:53
Context
2014-09-24
00:59
Add the MemPage.noPayload boolean and use it to help cellSizePtr() and btreeParseCellPtr() run faster. check-in: 8e337531 user: drh tags: trunk
2014-09-23
23:12
Remove an unused C-preprocessor macro. No functional changes to the code. check-in: f480582c user: drh tags: trunk
22:36
Avoid calling btreeParseCellPtr() from within fillInCell() since most of what btreeParseCellPtr() computes is ignored by fillInCell(). Instead, have fillInCell() compute the values it needs inline. Performance improvement. check-in: 4147f667 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

   964    964   }
   965    965   
   966    966   /*
   967    967   ** Parse a cell content block and fill in the CellInfo structure.  There
   968    968   ** are two versions of this function.  btreeParseCell() takes a 
   969    969   ** cell index as the second argument and btreeParseCellPtr() 
   970    970   ** takes a pointer to the body of the cell as its second argument.
   971         -**
   972         -** Within this file, the parseCell() macro can be called instead of
   973         -** btreeParseCellPtr(). Using some compilers, this will be faster.
   974    971   */
   975    972   static void btreeParseCellPtr(
   976    973     MemPage *pPage,         /* Page containing the cell */
   977    974     u8 *pCell,              /* Pointer to the cell text. */
   978    975     CellInfo *pInfo         /* Fill in this structure */
   979    976   ){
   980    977     u8 *pIter = &pCell[pPage->childPtrSize];
................................................................................
  1030   1027       }else{
  1031   1028         pInfo->nLocal = (u16)minLocal;
  1032   1029       }
  1033   1030       pInfo->iOverflow = (u16)(&pInfo->pPayload[pInfo->nLocal] - pCell);
  1034   1031       pInfo->nSize = pInfo->iOverflow + 4;
  1035   1032     }
  1036   1033   }
  1037         -#define parseCell(pPage, iCell, pInfo) \
  1038         -  btreeParseCellPtr((pPage), findCell((pPage), (iCell)), (pInfo))
  1039   1034   static void btreeParseCell(
  1040   1035     MemPage *pPage,         /* Page containing the cell */
  1041   1036     int iCell,              /* The cell index.  First cell is 0 */
  1042   1037     CellInfo *pInfo         /* Fill in this structure */
  1043   1038   ){
  1044         -  parseCell(pPage, iCell, pInfo);
         1039  +  btreeParseCellPtr(pPage, findCell(pPage, iCell), pInfo);
  1045   1040   }
  1046   1041   
  1047   1042   /*
  1048   1043   ** Compute the total number of bytes that a Cell needs in the cell
  1049   1044   ** data area of the btree-page.  The return number includes the cell
  1050   1045   ** data header and the local payload, but not any overflow page or
  1051   1046   ** the space used by the cell pointer.