Bug 326432, r=annie.sullivan Bookmarks batches are transactions, livemarks

performance bug fixes.

Original committer: brettw%gmail.com
Original revision: 1.19
Original date: 2006/02/08 21:07:59
This commit is contained in:
benjamin%smedbergs.us 2006-07-18 15:08:04 +00:00
Родитель b7fea98415
Коммит 5ccce391b1
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -110,8 +110,14 @@ private:
PRInt64 mRoot; PRInt64 mRoot;
PRInt64 mBookmarksRoot; PRInt64 mBookmarksRoot;
PRInt64 mToolbarRoot; PRInt64 mToolbarRoot;
// the level of nesting of batches, 0 when no batches are open
PRInt32 mBatchLevel; PRInt32 mBatchLevel;
// true if the outermost batch has an associated transaction that should
// be committed when our batch level reaches 0 again.
PRBool mBatchHasTransaction;
nsCOMPtr<mozIStorageStatement> mDBGetFolderInfo; // kGetFolderInfoIndex_* results nsCOMPtr<mozIStorageStatement> mDBGetFolderInfo; // kGetFolderInfoIndex_* results
nsCOMPtr<mozIStorageStatement> mDBGetChildren; // kGetInfoIndex_* results + kGetChildrenIndex_* results nsCOMPtr<mozIStorageStatement> mDBGetChildren; // kGetInfoIndex_* results + kGetChildrenIndex_* results
@ -140,4 +146,11 @@ private:
PRInt64 aFolder); PRInt64 aFolder);
}; };
struct nsBookmarksUpdateBatcher
{
nsBookmarksUpdateBatcher() { nsNavBookmarks::GetBookmarksService()->BeginUpdateBatch(); }
~nsBookmarksUpdateBatcher() { nsNavBookmarks::GetBookmarksService()->EndUpdateBatch(); }
};
#endif // nsNavBookmarks_h_ #endif // nsNavBookmarks_h_