sosolimited / recon_frontend

12 stars 8 forks source link

Frequent word count superscript : Is double div causing slowdown? #82

Closed ericgunther closed 12 years ago

ericgunther commented 12 years ago

Granted, we'll be adding lots more crap to the transcript and we'll definitely look into culling the offscreen paragraphs—part of the slowdown might be coming from the double-div for the superscripts.

Is there a way to make those superscripts a single span? And have them either added as a child of the word span or actually inserted into the word span flow?

ericgunther commented 12 years ago

PS Animation of these isn't high priority. Since they're so tiny, they can just show up.

kronick commented 12 years ago

I think I found the main source of scrolling performance-- I was finding the elements in view on the page by using $(el).offset() which apparently is really slow. Now I'm caching each paragraph's top and bottom positions in 'data-top' and 'data-bottom' attributes. This makes things much snappier.

ericgunther commented 11 years ago

Wowsers—much smoover. Thanks.