Bug 85293

Summary: IndexedDB: Refactor *::loadCurrentRow() to share more code
Product: WebKit Reporter: Alec Flett <alecflett>
Component: WebCore Misc.Assignee: Alec Flett <alecflett>
Status: RESOLVED WONTFIX    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Alec Flett
Reported 2012-05-01 09:39:29 PDT
There is a lot of duplicated code, specifically a lot of tricky version-checking logic that is duplicated between: * ObjectStoreCursorImpl::loadCurrentRow() * IndexCursorImpl::loadCurrentRow() * IndexKeyCursorImpl::loadCurrentRow() Most of the common/version-checking code could go into CursorImplCommon As an aside, there are also a lot of places where these methods return 'false' because the data found is either the wrong version or somehow corrupt. We should think about if we should, at least in the index cases, remove the data so that corrupt data doesn't build up inside the leveldb and slow down iteration. (i.e. imagine something goes haywire and some large chunk of data is corrupt - we'll have to keep skipping over that data every time we iterate) See bug 85224 for an example of where this was causing a real performance issue. That case has been cleaned up but we might want to handle more cases.
Attachments
Alec Flett
Comment 1 2012-05-01 09:39:54 PDT
filed bug 85293 about the refactoring
Note You need to log in before you can comment on or make changes to this bug.