What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 122 Stack Exchange communities.

TL; DR: Each late answer you're reviewing (hitting I'm Done or Not Sure) is stored in session. After few reviews, the session become so huge, that Chrome throw up an error.


On the /review-beta/late-answers, it seems that the review system use the browser Session Storage to keep an history of what I've reviewed.

It seems that I'm reviewed too much late answers, because I constantly have an incremental JS error about the exceeded quota of session storage (full image):

enter image description here

Regarding this question/answer, it may come from the localStorage.

If I took a look on what SO store 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 to huge I think.

I know it won't be easy to reproduce the bug, because you'll have to review few answers to have this kind of size for your session storage.

By the way, I close the tab and re-open a new one and the problem was gone.

But I finally come back to see what's going on. I dig into the History.store and I find that every time you click on I'm Done or Not Sure, size of the session increase 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: "http://stackoverflow.com/review/task-reviewed"
XHR finished loading: "http://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: "http://stackoverflow.com/review/inline-edit-post?id=12374482&improve=false&reviewTaskId=679498&_=1348599161672"
XHR finished loading: "http://stackoverflow.com/posts/12374482/edit-submit/1ab5b877-d63f-499b-9ae1-7a00c8f23feb"
XHR finished loading: "http://stackoverflow.com/review/next-task"
XHR finished loading: "http://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: "http://stackoverflow.com/review/task-reviewed"
XHR finished loading: "http://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 continue to review few other answers and then come back to see my dear friend History.store:

sessionStorage.getItem('History.store').length
1565179

Woohoo :o There is 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 few informations, 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 increase the size of the session.

Anyway, I think you should reduce informations 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.

share|improve this question
1  
Interesting.. right off the bat, I can see that we're inadvertently storing a ton of unnecessary stuff via the history plugin we're using. But I'll try to get a repro first so I can test a fix. –  Emmett Sep 25 '12 at 19:32
add comment

1 Answer

up vote 7 down vote accepted

We were inadvertently pushing a ton of junk into the sessionStorage by way of the html5history plug-in we're using. It's fixed now, so hopefully you won't see this error any more.

share|improve this answer
    
Great, you are storing less data. But I still have the Uncaught ReferenceError: votesCast is not defined –  j0k Sep 27 '12 at 7:27
    
That should be fixed now too. Thanks for the tip. –  Emmett Sep 27 '12 at 18:35
1  
Just curious - what did you do to fix this? We're also using history.js and I was wondering if you've just stopped using it, or you modified history.js to be less of a space hog (or to just not use sessionStorage)? –  billmag Jan 9 '13 at 22:34
    
@billmag It wasn't a problem with the plug-in, just a bug in our code. –  Emmett Apr 18 '13 at 18:28
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .