Skip to content
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

QUOTA_BYTES_PER_ITEM #17

Open
djmichaelsaler opened this issue Sep 29, 2019 · 7 comments
Open

QUOTA_BYTES_PER_ITEM #17

djmichaelsaler opened this issue Sep 29, 2019 · 7 comments

Comments

@djmichaelsaler
Copy link

When read a lot of GE of a player in console tab flash this message:
QUOTA_BYTES_PER_ITEM quota exceeded
(anonymous) @ storage.js:123
I change syncSet and syncGet by localSet and localGet to fix it.

@veger
Copy link
Owner

veger commented Sep 30, 2019

When building this, I checked the quotas and noticed that it looks like the quotas were not 'active'..? (I exceeded them without issues).
But it looks like you found the limits.

As I assumed these limits should have been actually used, I created ways to clean up the data.
If you go to the 'Settings' tab you can clean the data for each world you are active in. (It removed data that is not refreshed in the last 7 days, if I remember correctly)

@veger
Copy link
Owner

veger commented Sep 30, 2019

I checked the code, it is 3 weeks.

@paskyorg
Copy link

paskyorg commented Oct 4, 2019

The problem is not QUOTA_BYTES (102,400 bytes), but QUOTA_BYTES_PER_ITEM (8,192 bytes).
With only 9 users and 160 great building in total, the limit of 8,192 bytes is exceeded.

I have added to the syncSet function, this line:
console.log(JSON.stringify(worldItems).length)

Screenshot_1

And this is the console output: 9065.

Screenshot_2

@paskyorg
Copy link

paskyorg commented Oct 4, 2019

Either each user becomes an individual key or the limit will easily be exceeded.
Or maybe the best option is to switch to chrome.storage.local with 5,242,880 bytes of quota.

@veger
Copy link
Owner

veger commented Oct 4, 2019

Switching to chrome.storage.local might be best solution.
I had the idea to be able to sync the collected data, so independent of your location/device you would have this info available. But it is far too small to keep all info I guess...

@djmichaelsaler
Copy link
Author

@veger
Copy link
Owner

veger commented Oct 7, 2019

You still have QUOTA_BYTES. So it helps a little, but you will pass this (soon) as well.
The chrome.storage.local has a much higher limit, so going for this storage is seems best bet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants