TextareaCache icon indicating copy to clipboard operation
TextareaCache copied to clipboard

Huge slowdown in Slack

Open majutsushi opened this issue 7 years ago • 11 comments

Hi,

we're using Slack for internal chats in our company. However, I noticed that the text input gets increasingly slower the more text is in the input field. After typing a few words each new character takes several seconds to actually appear, during which Firefox uses a lot of CPU. Disabling TextareaCache Lite immediately fixes the issue.

In case it is relevant, this is how the input is defined:

<form id="msg_form" class="offline" onsubmit="TS.view.submit(); return false;" data-qa="message_form">
(lots of divs for styling and such)
</form>

majutsushi avatar Oct 25 '17 21:10 majutsushi

I can reproduce the same problem even here in the github comment area. When I have TCL enabled and I mash they keyboard keys quickly, the CPU utilization goes 100% and characters start appearing with a big delay, 10 seconds and more. When I disable TCL, CPU utilization is 20% and characters appear immediately.

It seems that TCL is saving the window contents after every character change, or something like that.

kparal avatar Nov 01 '17 11:11 kparal

Hi @kparal & @majutsushi, thanks for your report, could you confirm the version of your TCL?

The latest version is v2.5.0, you could find the info at about:addons

like this:

2017-11-03 17-05-59

wildskyf avatar Nov 03 '17 09:11 wildskyf

TCL 2.5.0 as well. Firefox 57, Fedora 27

kparal avatar Nov 03 '17 09:11 kparal

@kparal Do you have lots of cache in your textarea cache?

wildskyf avatar Nov 03 '17 09:11 wildskyf

I had about 960 items in the drop down list. After clearing all cache, text input is no longer slowed down. I think TCL should be smarter when working with a large cache (don't save after each character, perhaps, and do it in a different thread if possible) and also auto-clean old cache automatically.

Anyway, thanks for helping me resolve this on my end (at least temporarily).

kparal avatar Nov 03 '17 11:11 kparal

@kparal you're welcome, and I will fix this problem in the near future version.

wildskyf avatar Nov 04 '17 07:11 wildskyf

My list of items in the dropdown list was significantly shorter, but clearing all caches still made the slowdown go away. So I guess I'll do that occasionally for now if I notice the slowdown coming back again.

majutsushi avatar Nov 05 '17 23:11 majutsushi

@majutsushi sorry about the slowdown, I will find a solution to fix it soon.

wildskyf avatar Nov 06 '17 08:11 wildskyf

In the current version, I add slack.com into the default exception list. (and some sites in which there are some problems. performance, function-breaking, ...etc )

If you want it back, go to preference page of textarea cache and remove slack.com from the list.

wildskyf avatar Nov 18 '17 13:11 wildskyf

info for debugging:

going to about:memory
pressing the "Measure" button
then scrolling down to the section titled "Add-ons".

wildskyf avatar Dec 03 '17 10:12 wildskyf

Hi there, I finally find that this extension is the cause of a performance issue with MediaWiki's VisualEditor. However I didn't reproduce it with Wikipedia, only with my local wiki.

lilydjwg avatar Dec 22 '18 06:12 lilydjwg