bkdevtoronto / rmt

Repo for the "reddit Match Threader" Chrome Extension
https://reddit.com/r/coys
GNU General Public License v3.0
0 stars 0 forks source link

QUOTA_BYTES_PER_ITEM being exceeded by long commentary #1

Closed bkdevtoronto closed 6 years ago

bkdevtoronto commented 6 years ago

Got to about 65 minutes of a match thread and the commentary wouldn't save/process because of an error.

The issue is that the QUTOA_BYTES_PER_ITEM quota is 4096 and storing anything bigger than this will not work and as such the commentary tool function just returned false.

Solution (temporary):

  1. In the Match Thread post, delete the commentary bookends ([](#rmt-commentary-full-start)...[](#rmt-commentary-full-end)
  2. Add line afterward with the {{FULL_COMMENTARY}} macro
  3. Delete all preexisting commentary lines in the extension (note: as of 20180121@1808 the "reset data" button on the Updates tab isn't functional so this is a frustrating process)
  4. Continue from where you left off and the commentary will append

Solution (permanent) is to create a sync function for retrieving data from and saving data to local storage that splits up the data into chunks using the browser's QUOTA_BYTES_PER_ITEM.

Example here.

bkdevtoronto commented 6 years ago

Tested the following:

The solution currently in play is to save the Commentary data to the Local Storage instead of the Chrome Sync, which has a byte limit I am yet to hit