Has anyone else noticed Discourse slowdowns following 120 -> 121 upgrades

We recently isolated that performance on Firefox has become very uneven on 121, first render is OK but click around a bit and stuff starts operating at half speed across the board on Discourse.

We saw this both on Linux and Mac.

I will try to report to bugzilla but wondering if anyone else here noticed this as well?

I haven’t noticed this but a bug report with some steps to reproduce would be 100% appreciated.

Also worthwhile would be a Firefox Profile: https://profiler.firefox.com/

We figured this one out, we have an experimental component on meta.discourse.org that added:

  .buttons:has(*:nth-child(n + 3)) > button span,
  .buttons:has(*:nth-child(n + 3)) .quote-sharing button span,
  .buttons:has(*:nth-child(n + 3)) .ai-post-helper > button span {
    display: none;

  .buttons:has(*:nth-child(n + 3)) > button svg,
  .buttons:has(*:nth-child(n + 3)) .quote-sharing button svg,
  .buttons:has(*:nth-child(n + 3)) .ai-post-helper > button svg {
    margin: 0;
    font-size: var(--font-up-1);

Chrome is able to handle this somewhat gracefully, but on Firefox 121 (which just added support for has) performance gets pathological, especially if you are adding stuff to the DOM

1 Like

We have noticed also dramatic change in version 121 in sorting and searching (so rerendering). We are using semantic-ui components and they at least have some “:has” in use.
Did you already open a bug?

We were also able to circumvent the problem by removing all “:has” selectors from semantic ui components.
Good find Sam!

Here is the relevant bug in bugzilla:

1 Like