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

Issue 12398008: Purge in-memory localStorage areas if the # of areas exceeds the limit (Closed)

Created:
7 years, 9 months ago by kinuko
Modified:
7 years, 8 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Visibility:
Public.

Description

Purge in-memory localStorage areas if the # of areas exceeds the limit BUG=178980 TEST=manual (verified the memory stops increasing at a certain level) Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193585

Patch Set 1 #

Total comments: 2

Patch Set 2 : update #

Total comments: 2

Patch Set 3 : #

Total comments: 4

Patch Set 4 : updated #

Patch Set 5 : comment fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -5 lines) Patch
M webkit/dom_storage/dom_storage_area.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M webkit/dom_storage/dom_storage_context.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M webkit/dom_storage/dom_storage_host.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M webkit/dom_storage/dom_storage_host.cc View 1 2 3 2 chunks +16 lines, -0 lines 0 comments Download
M webkit/dom_storage/dom_storage_namespace.h View 1 2 3 2 chunks +13 lines, -1 line 0 comments Download
M webkit/dom_storage/dom_storage_namespace.cc View 1 2 3 4 3 chunks +15 lines, -3 lines 0 comments Download
M webkit/dom_storage/dom_storage_types.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
kinuko
This patch is apparently not for review, but sending this anyway for discussion.
7 years, 9 months ago (2013-03-04 15:26:12 UTC) #1
michaeln
https://codereview.chromium.org/12398008/diff/1/content/browser/dom_storage/dom_storage_message_filter.cc File content/browser/dom_storage/dom_storage_message_filter.cc (right): https://codereview.chromium.org/12398008/diff/1/content/browser/dom_storage/dom_storage_message_filter.cc#newcode128 content/browser/dom_storage/dom_storage_message_filter.cc:128: DCHECK_EQ(0, connection_dispatching_message_for_); Since there is an async code path ...
7 years, 9 months ago (2013-03-05 00:04:46 UTC) #2
kinuko
(Circling more people) Updated my rough patch. In the newer patch we only check the ...
7 years, 9 months ago (2013-03-06 06:20:15 UTC) #3
Mike West
Thanks Kinuko! https://codereview.chromium.org/12398008/diff/7001/content/browser/dom_storage/dom_storage_message_filter.cc File content/browser/dom_storage/dom_storage_message_filter.cc (right): https://codereview.chromium.org/12398008/diff/7001/content/browser/dom_storage/dom_storage_message_filter.cc#newcode131 content/browser/dom_storage/dom_storage_message_filter.cc:131: } This would likely be fairly easy ...
7 years, 9 months ago (2013-03-06 13:41:11 UTC) #4
michaeln
Keeping detailed track of number of bytes per area and recomputing it frequently seems costly ...
7 years, 9 months ago (2013-03-06 23:14:51 UTC) #5
michaeln
Something along these lines maybe? bool DomStorageHost::ExtractAreaValues( int connection_id, ValuesMap* map) { map->clear(); DomStorageArea* area ...
7 years, 9 months ago (2013-03-06 23:50:19 UTC) #6
kinuko
(My god, I lost my long reply twice due to invalid XSRF-- makes me cry ...
7 years, 9 months ago (2013-03-07 03:06:12 UTC) #7
michaeln
willchan setup a histogram that logs the size of areas in KBytes. There are some ...
7 years, 9 months ago (2013-03-08 21:13:59 UTC) #8
kinuko
On 2013/03/08 21:13:59, michaeln wrote: > willchan setup a histogram that logs the size of ...
7 years, 9 months ago (2013-03-11 05:08:09 UTC) #9
michaeln
> So most of them are less than 1K? Should we count differently for such ...
7 years, 9 months ago (2013-03-11 21:12:35 UTC) #10
kinuko
Reviving this thread... I updated the patch to purge memory when the # of areas ...
7 years, 8 months ago (2013-04-04 08:29:41 UTC) #11
michaeln
thnx for waking this up, i think this cut at it looks promising https://codereview.chromium.org/12398008/diff/31001/webkit/dom_storage/dom_storage_namespace.cc File ...
7 years, 8 months ago (2013-04-05 23:39:23 UTC) #12
kinuko
Thanks! Updated the code. https://codereview.chromium.org/12398008/diff/31001/webkit/dom_storage/dom_storage_namespace.cc File webkit/dom_storage/dom_storage_namespace.cc (right): https://codereview.chromium.org/12398008/diff/31001/webkit/dom_storage/dom_storage_namespace.cc#newcode124 webkit/dom_storage/dom_storage_namespace.cc:124: while (it != areas_.end()) { ...
7 years, 8 months ago (2013-04-10 07:04:14 UTC) #13
michaeln
lgtm, thnx for poking at this!
7 years, 8 months ago (2013-04-10 21:28:07 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/12398008/85001
7 years, 8 months ago (2013-04-11 02:45:35 UTC) #15
commit-bot: I haz the power
7 years, 8 months ago (2013-04-11 06:04:58 UTC) #16
Message was sent while issue was closed.
Change committed as 193585

Powered by Google App Engine
This is Rietveld 408576698