Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Issue 8400061: IndexedDB: Recycle cursor objects when calling continue(). (Closed)

Created:
9 years, 1 month ago by hans
Modified:
9 years, 1 month ago
Reviewers:
michaeln, jam, brettw, dgrogan, jsbell
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, dpranke-watch+content_chromium.org
Visibility:
Public.

Description

IndexedDB: Recycle curosr objects when calling continue(). This is the Chromium side of https://bugs.webkit.org/show_bug.cgi?id=71115 Instead of creating a new IDBCursor wrapper each time continue() is called, we should instead send back a new onSuccessCursorContinue() callback, and the IDBRequest will know which cursor to return. This patch implements the new callback. For performance, we piggy-pick the cursor's current key, primary key and value with the callback. To be able to do this, the IndexedDBDispatcherHost must keep track of which cursor corresponds to which pending callback. The IndexedDBDispatcher keeps the key, primary key and value cached for each cursor. BUG=98685 TEST=all current tests pass Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=108788

Patch Set 1 #

Total comments: 24

Patch Set 2 : New version #

Total comments: 10

Patch Set 3 : New version #

Total comments: 8

Patch Set 4 : Callback renamed to onSuccessWithContinuation, and style fixes #

Total comments: 10

Patch Set 5 : More style nits fixed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -23 lines) Patch
M content/browser/in_process_webkit/indexed_db_callbacks.h View 1 2 3 2 chunks +11 lines, -3 lines 0 comments Download
M content/browser/in_process_webkit/indexed_db_callbacks.cc View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download
M content/browser/in_process_webkit/indexed_db_dispatcher_host.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/in_process_webkit/indexed_db_dispatcher_host.cc View 1 2 3 4 5 chunks +10 lines, -4 lines 0 comments Download
M content/common/indexed_db_messages.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M content/renderer/indexed_db_dispatcher.h View 1 2 3 4 5 chunks +13 lines, -0 lines 0 comments Download
M content/renderer/indexed_db_dispatcher.cc View 1 2 3 4 3 chunks +29 lines, -3 lines 0 comments Download
M content/renderer/renderer_webidbcursor_impl.h View 1 2 3 2 chunks +7 lines, -6 lines 0 comments Download
M content/renderer/renderer_webidbcursor_impl.cc View 1 2 3 3 chunks +14 lines, -7 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
hans
Please take a look. I'd be especially grateful if you can help me look for ...
9 years, 1 month ago (2011-10-28 14:03:59 UTC) #1
dgrogan
http://codereview.chromium.org/8400061/diff/1/content/renderer/indexed_db_dispatcher.cc File content/renderer/indexed_db_dispatcher.cc (right): http://codereview.chromium.org/8400061/diff/1/content/renderer/indexed_db_dispatcher.cc#newcode439 content/renderer/indexed_db_dispatcher.cc:439: primaryKey, value)); You can remove the non-object_id parameters. http://codereview.chromium.org/8400061/diff/1/content/renderer/indexed_db_dispatcher.cc#newcode441 ...
9 years, 1 month ago (2011-10-29 00:54:28 UTC) #2
michaeln
http://codereview.chromium.org/8400061/diff/1/content/browser/in_process_webkit/indexed_db_callbacks.cc File content/browser/in_process_webkit/indexed_db_callbacks.cc (right): http://codereview.chromium.org/8400061/diff/1/content/browser/in_process_webkit/indexed_db_callbacks.cc#newcode44 content/browser/in_process_webkit/indexed_db_callbacks.cc:44: void IndexedDBCallbacks<WebKit::WebIDBCursor>::onSuccessCursorContinue() { Would it make sense to pass ...
9 years, 1 month ago (2011-10-30 21:54:06 UTC) #3
michaeln
http://codereview.chromium.org/8400061/diff/1/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc File content/browser/in_process_webkit/indexed_db_dispatcher_host.cc (right): http://codereview.chromium.org/8400061/diff/1/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc#newcode954 content/browser/in_process_webkit/indexed_db_dispatcher_host.cc:954: parent_->pending_cursor_continues_[response_id] = cursor_id; On 2011/10/30 21:54:06, michaeln wrote: > ...
9 years, 1 month ago (2011-10-31 15:08:17 UTC) #4
hans
Thanks very much for your comments, it's very helpful. New version coming up. http://codereview.chromium.org/8400061/diff/1/content/browser/in_process_webkit/indexed_db_callbacks.cc File ...
9 years, 1 month ago (2011-10-31 16:11:52 UTC) #5
michaeln
http://codereview.chromium.org/8400061/diff/1/content/browser/in_process_webkit/indexed_db_callbacks.cc File content/browser/in_process_webkit/indexed_db_callbacks.cc (right): http://codereview.chromium.org/8400061/diff/1/content/browser/in_process_webkit/indexed_db_callbacks.cc#newcode49 content/browser/in_process_webkit/indexed_db_callbacks.cc:49: On 2011/10/31 16:11:52, hans wrote: > On 2011/10/30 21:54:06, ...
9 years, 1 month ago (2011-10-31 18:58:25 UTC) #6
hans
On 2011/10/31 18:58:25, michaeln wrote: > That comment isn't so reassuring since there are no ...
9 years, 1 month ago (2011-11-01 14:57:36 UTC) #7
hans
http://codereview.chromium.org/8400061/diff/8001/content/browser/in_process_webkit/indexed_db_callbacks.cc File content/browser/in_process_webkit/indexed_db_callbacks.cc (right): http://codereview.chromium.org/8400061/diff/8001/content/browser/in_process_webkit/indexed_db_callbacks.cc#newcode48 content/browser/in_process_webkit/indexed_db_callbacks.cc:48: On 2011/10/31 18:58:25, michaeln wrote: > should we be ...
9 years, 1 month ago (2011-11-01 14:57:45 UTC) #8
michaeln
> And that IDBRequest holds a reference to the cursor (with my WebKit patch). > ...
9 years, 1 month ago (2011-11-01 18:38:37 UTC) #9
hans
On 2011/11/01 18:38:37, michaeln wrote: > > And that IDBRequest holds a reference to the ...
9 years, 1 month ago (2011-11-01 19:19:50 UTC) #10
michaeln
On 2011/11/01 19:19:50, hans wrote: > On 2011/11/01 18:38:37, michaeln wrote: > > > And ...
9 years, 1 month ago (2011-11-01 21:16:46 UTC) #11
michaeln
> When the cursor hits the end, what should it's key, value, and primaryKey > ...
9 years, 1 month ago (2011-11-02 01:08:59 UTC) #12
hans
On 2011/11/02 01:08:59, michaeln wrote: > > When the cursor hits the end, what should ...
9 years, 1 month ago (2011-11-02 16:43:54 UTC) #13
hans
On 2011/11/01 21:16:46, michaeln wrote: > > So as long as a continue call has ...
9 years, 1 month ago (2011-11-02 16:46:26 UTC) #14
hans
http://codereview.chromium.org/8400061/diff/15001/content/browser/in_process_webkit/indexed_db_callbacks.h File content/browser/in_process_webkit/indexed_db_callbacks.h (right): http://codereview.chromium.org/8400061/diff/15001/content/browser/in_process_webkit/indexed_db_callbacks.h#newcode91 content/browser/in_process_webkit/indexed_db_callbacks.h:91: , cursor_id_(cursor_id) { } On 2011/11/01 18:38:37, michaeln wrote: ...
9 years, 1 month ago (2011-11-02 17:16:58 UTC) #15
michaeln
On 2011/11/02 16:46:26, hans wrote: > On 2011/11/01 21:16:46, michaeln wrote: > > > So ...
9 years, 1 month ago (2011-11-03 01:36:19 UTC) #16
michaeln
This change lg at this point, but lets wait on the wk patch review prior ...
9 years, 1 month ago (2011-11-03 01:37:21 UTC) #17
hans
On 2011/11/03 01:37:21, michaeln wrote: > This change lg at this point, but lets wait ...
9 years, 1 month ago (2011-11-03 13:24:27 UTC) #18
michaeln
lgtm http://codereview.chromium.org/8400061/diff/20003/content/renderer/indexed_db_dispatcher.cc File content/renderer/indexed_db_dispatcher.cc (right): http://codereview.chromium.org/8400061/diff/20003/content/renderer/indexed_db_dispatcher.cc#newcode450 content/renderer/indexed_db_dispatcher.cc:450: nit: blank line not needed http://codereview.chromium.org/8400061/diff/20003/content/renderer/indexed_db_dispatcher.cc#newcode497 content/renderer/indexed_db_dispatcher.cc:497: void ...
9 years, 1 month ago (2011-11-03 18:10:03 UTC) #19
hans
http://codereview.chromium.org/8400061/diff/20003/content/renderer/indexed_db_dispatcher.cc File content/renderer/indexed_db_dispatcher.cc (right): http://codereview.chromium.org/8400061/diff/20003/content/renderer/indexed_db_dispatcher.cc#newcode450 content/renderer/indexed_db_dispatcher.cc:450: On 2011/11/03 18:10:04, michaeln wrote: > nit: blank line ...
9 years, 1 month ago (2011-11-04 10:09:44 UTC) #20
hans
brettw: owners approval for content/renderer and content/common please.
9 years, 1 month ago (2011-11-04 10:14:08 UTC) #21
hans
On 2011/11/04 10:14:08, hans wrote: > brettw: owners approval for content/renderer and content/common please. jam: ...
9 years, 1 month ago (2011-11-04 17:48:27 UTC) #22
jam
lgtm
9 years, 1 month ago (2011-11-04 22:09:51 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hans@chromium.org/8400061/26001
9 years, 1 month ago (2011-11-05 11:12:34 UTC) #24
commit-bot: I haz the power
9 years, 1 month ago (2011-11-05 12:36:37 UTC) #25
Change committed as 108788

Powered by Google App Engine
This is Rietveld 408576698