New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove localStorage size limit #897
Comments
👍 |
1 similar comment
+1 |
👍 |
1 similar comment
👍 |
Github should really add some kind of +1 / Like / Star function to issues ;) +1 |
⚡ |
Fixed with dom_storage_map.patch. |
I believe that the local storage limit has been removed already. I tested my app but unfortunately, I'm stuck at 27.77MB... or 10485756 string length of the value. Anyone can tell me about these limits? |
On v35.0 and I'm only able to get up to 10mb. |
This work ? |
|
Using 1.4.13 and still limited to 10Mb |
@nunomluz perhaps open a new issue? Seems a lot of people have the same issue for over a year and there has been no response here from the Electron dev team. |
+1 |
1 similar comment
+1 |
@zcbenz 's patch does not work any more, because of more code added in chromium. +#if 0
// Only check quota if the size is increasing, this allows
// shrinking changes to pre-existing files that are over budget.
if (new_item_size > old_item_size && new_bytes_used > quota_)
return false;
+#endif There are several checks up in files such as bool LocalStorageCachedArea::SetItem(const base::string16& key,
const base::string16& value,
const GURL& page_url,
const std::string& storage_area_id) {
// A quick check to reject obviously overbudget items to avoid priming the
// cache.
if ((key.length() + value.length()) * sizeof(base::char16) >
kPerStorageAreaQuota) // NOTE @asinbow we cannot overcome this check
return false;
EnsureLoaded();
base::NullableString16 unused;
if (!map_->SetItem(key, value, &unused)) // NOTE @zcbenz 's patch check inside this function
return false;
// Ignore mutations to |key| until OnSetItemComplete.
ignore_key_mutations_[key]++;
leveldb_->Put(String16ToUint8Vector(key), String16ToUint8Vector(value),
PackSource(page_url, storage_area_id),
base::Bind(&LocalStorageCachedArea::OnSetItemComplete,
weak_factory_.GetWeakPtr(), key));
return true;
} Another file bool DOMStorageCachedArea::SetItem(int connection_id,
const base::string16& key,
const base::string16& value,
const GURL& page_url) {
// A quick check to reject obviously overbudget items to avoid
// the priming the cache.
if ((key.length() + value.length()) * sizeof(base::char16) >
kPerStorageAreaQuota)
return false;
PrimeIfNeeded(connection_id);
base::NullableString16 unused;
if (!map_->SetItem(key, value, &unused))
return false;
// Ignore mutations to 'key' until OnSetItemComplete.
ignore_key_mutations_[key]++;
proxy_->SetItem(
connection_id, key, value, page_url,
base::Bind(&DOMStorageCachedArea::OnSetItemComplete,
weak_factory_.GetWeakPtr(), key));
return true;
} |
You have two choices to fix this problem:1. [NOT recommended] Uncomment those two extra
|
@asinbow It would be awesome if you could submit a PR to libcc to add a patch to fix this 👍 I've removed your binary patch from your comment for user safety (no way to prove what that patch will do). But I'd love to help you get your change through as a patch in libcc |
+1 |
@MarshallOfSound Where (repo URL?) should this be fixed? I'm trying to find |
Looks like #8337 is now the active issue for this problem. |
Seems relevant to this issue. #13465 |
@ccorcos I think that's actually a different problem. The one referred to in this issue (and #8337) and that was patched in #15596 refers to a specific, non-silent error that occurs when storing more than 10MiB of data in |
It seems silly to limit localStorage to 5 megs since we don't need to support it for an arbitrary number of domains like a browser does, especially since we can't really control how much disk packages use since they can put whatever they want in the filesystem. I think we should either remove the limit entirely or set it to a much larger number than 5 megs.
cc @atom/core
The text was updated successfully, but these errors were encountered: