bkad / prat

group chat with markdown served over websockets
11 stars 6 forks source link

Small hang while deleting first letter in input box #70

Closed cespare closed 11 years ago

cespare commented 11 years ago

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?

bkad commented 11 years ago

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

cespare commented 11 years ago

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

cespare commented 11 years ago

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.

cespare commented 11 years ago

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

gkoo commented 10 years ago

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.

bkad commented 10 years ago

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