bkad / prat

group chat with markdown served over websockets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Small hang while deleting first letter in input box

cespare opened this issue · comments

We must be executing non-trivial JS when you delete the first letter in the input box, because there's a noticeable hang. For instance, type "aaaaaaaaaa" and then hold down backspace. You'll notice that there's a small delay before the first letter is deleted.

wtf?

i cant repro on my mac in pratchat, there a particular sha in which is this occurring?

It happens for me right now on pratchat. I'll figure it out if it's a linux-specific bug.

This may be specific to linux on Chrome. It's worse the more channels you're in, but the channels have to have lots of contents (it doesn't repro if you open lots of empty channels). It's extremely noticeable (500ms+ hang) on prat.mtv when I have 10 or so busy channels open.

After some git bisecting I figured out that it's related to using display: none to hide the non-active channel windows. I have a "fix" (hackaround) but it'd be awesome to have a better idea of why it's happening.

One strange aspect of this fix is that visibility: hidden also doesn't work. Only opacity: 0 does the trick.

FYI: I changed this back to display:none for our prat instance, and I can definitely reproduce this on OS X Chrome version 29. So I don't think it's just on Linux.

Weird, this used to be a linux-only issue... but I can absolutely repro it now on my macbook.