Why do I feel writing in discourse composer became slow?

AI-generated summary

Users reported severe lag while typing in the Discourse composer, with visible delays between keystrokes and character display—especially after a recent update. Pad_Pors first flagged the issue on their forum and Meta, suspecting browser or system issues. sam confirmed the problem, noting FPS drops to 10 during typing and identifying that the entire composer re-renders on every keystroke image. riking echoed the issue on Android, finding it jarring enough to switch to voice typing. sam traced the root cause to something invalidating the composer state on keystrokes and planned to bisect commits. j.jaffeux quickly identified the culprit as a commit they made 12 days prior. sam humorously noted the irony of fast computers masking the bug. The fix was committed in 7132c50 and backported to the beta branch j.jaffeux. codinghorror thanked Pad_Pors for the report, calling it a critical find. The issue highlights how a recent change caused major performance degradation, now resolved.

at the moment that I’m typing; there is a time gap between me clicking on the letter and the letter appearing in the composer.

the pace has became such that the time-gap is visible and you get the feeling that the system is going to hang!

it happens to both our forum (after yesterday update) and meta, but there (at our forum) it’s more visible.

is it something related to my browser or my computer or were there any updates regarding the composer?

7 likes

Looks like we have something going on here that needs debugging. Seeing fps dip to 10 while typing.

10 likes

Yep, this was extremely jarring on Android earlier today. So much so that I decided to just switch to voice typing instead.

8 likes

I can see the backtrace here.

Something is causing the full composer to re-render with the entire composer toolbar on every keypress.

The problem is that the way everything is glued answering “why” is very hard, typing is invalidating something.

Next step is to bisect to find the commit.

This is really really bad, we will need a new beta here @codinghorror

@eviltrout / @david / @j.jaffeux I will try bisecting this soon

7 likes

I think I know what it is., it’ a commit I made 12 days ago!

7 likes

Serves us right for having fast computers. :slight_smile:

Thanks for taking care of this, will stop looking at it.

7 likes

Fixed in:

https://github.com/discourse/discourse/commit/7132c50f3bb9776676c8a1ca6eff67227ef36d06

It’s been backported into beta branch. Thanks a lot for the report :+1:

14 likes

oof good find @Pad_Pors thank you :tada:

4 likes