TL; DR: Each late answer you're reviewing (hitting I'm Done or Not Sure) is stored in session. After a few reviews, the session becomes so huge, that Chrome throws up an error.
On the /review/late-answers
, it seems that the review system uses the browser Session Storage to keep a history of what I've reviewed.
It seems that I'm reviewing too many late answers, because I constantly have an incremental JS error about the exceeded quota of session storage (full image):
Regarding this question/answer, it may come from the localStorage.
If I took a look on what SO stores on my browser, I saw one localStorage and one Session Storage. Inside Session Storage, there is History.store
, which seems to be huge...
I wasn't able to find the size of it using sessionStorage.getItem('History.store').length
because ... it was too huge I think.
I know it won't be easy to reproduce the bug because you'll have to review quite a few answers to have this kind of size for your session storage.
By the way, I closed the tab and re-opened a new one, and the problem was gone.
But I finally came back to see what's going on. I dug into the History.store
and I found that every time you click on I'm Done or Not Sure, the size of the session increases by ~30.000, which seems to be the session of each information related to an answer (information, id, link, content, etc ...):
sessionStorage.getItem('History.store').length
33878
XHR finished loading: "https://stackoverflow.com/review/task-reviewed"
XHR finished loading: "https://stackoverflow.com/posts/5435516/votes?_=1348599149396"
Uncaught ReferenceError: votesCast is not defined cdn.sstatic.net/js/full.js?v=038e537afd9e:124
sessionStorage.getItem('History.store').length
65336
XHR finished loading: "https://stackoverflow.com/review/inline-edit-post?id=12374482&improve=false&reviewTaskId=679498&_=1348599161672"
XHR finished loading: "https://stackoverflow.com/posts/12374482/edit-submit/1ab5b877-d63f-499b-9ae1-7a00c8f23feb"
XHR finished loading: "https://stackoverflow.com/review/next-task"
XHR finished loading: "https://stackoverflow.com/posts/5435516/votes?_=1348599178478"
Uncaught ReferenceError: votesCast is not defined cdn.sstatic.net/js/full.js?v=038e537afd9e:124
sessionStorage.getItem('History.store').length
65336
XHR finished loading: "https://stackoverflow.com/review/task-reviewed"
XHR finished loading: "https://stackoverflow.com/posts/9623671/votes?_=1348599187508"
Uncaught ReferenceError: votesCast is not defined cdn.sstatic.net/js/full.js?v=038e537afd9e:124
sessionStorage.getItem('History.store').length
99372
By the way, you'll notice the Uncaught ReferenceError
, but it's not blocking.
I continued to review a few other answers, and then came back to see my dear friend History.store
:
sessionStorage.getItem('History.store').length
1565179
There are around 51 answers inside the session, and I guess there is too much information. Even JsonLint.com can't handle the size :)
Inside this huge JSON, you are repeating some information, like this part for each answer:
"instructions": "This is a <strong>late answer to an old question</strong> provided by a new user. Watch for hidden gems, non-answers, and spam.",
"moreInstructions": "<p><strong>I'm Done</strong> is only available if you've done one of the following:</p><ul><li><strong>Vote up or down</strong> to rate the answer's helpfulness</li><li><strong>Edit</strong> to improve the answer's appearance, clarity, or accuracy</li><li><strong>Comment</strong> to leave constructive feedback for the author, or vote up existing comments</li><li><strong>Flag</strong> to notify the moderators of serious problems</li></ul><p>When in doubt, click <strong>Not Sure</strong> if you are unsure and want to skip this answer.</p>\r\n",
"actions": [
{
"name": "I'm Done",
"tooltip": "done reviewing this answer",
"disabled": true
},
{
"name": "Not Sure",
"tooltip": "skip this answer",
"disabled": false
}
],
which can be, obviously, factorized. You also store the whole content of the answer, which increases the size of the session.
Anyway, I think you should reduce the information you are storing inside the session. I guess you're using it to speed up the review, but it can become "useless" if the session is full. That's my case.