mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Store the page number for the PENDING_BYTE page in the Pager object, rather
than computing the page number every time it is needed, because it turns out that number is needed quite frequently. This saves a few hundred thousand CPU cycles and a few bytes of code space. FossilOrigin-Name: 5aa9c3eb45514d5eb7b32696d25a9aeb7dad485e1ea5adb833fac6d1f2105f1a
This commit is contained in:
@@ -598,7 +598,7 @@ struct BtCursor {
|
||||
/*
|
||||
** The database page the PENDING_BYTE occupies. This page is never used.
|
||||
*/
|
||||
# define PENDING_BYTE_PAGE(pBt) PAGER_MJ_PGNO(pBt)
|
||||
#define PENDING_BYTE_PAGE(pBt) ((Pgno)((PENDING_BYTE/((pBt)->pageSize))+1))
|
||||
|
||||
/*
|
||||
** These macros define the location of the pointer-map entry for a
|
||||
|
Reference in New Issue
Block a user