perf: long replies with many code blocks freeze the tab while streaming (#34495)

Every new code block in a streaming reply stalled the tab, and each stall was longer than the one before. The stalls came from `style-mod`, the library CodeMirror uses for its styles: version 4.1.3 rewrote its style sheet every time a code block's editor was created, even when nothing had changed, and with Fade Effect for Streaming Text on the browser then restyled the whole reply, including every word still fading in. Version 4.1.4 only rewrites it when its styles actually changed, and this pins it in the lockfile. In the runs behind this change, a reply with 300 code blocks that arrived all at once shows in 9 seconds instead of 143, and the same reply streamed gradually no longer stalls for more than 0.7 seconds at a time instead of 5.4. What remains is one 6.7 second freeze when such a reply arrives all at once, and a gradual stream that still takes about 57 seconds, longer than the same text without code blocks.

Refs #34492
This commit is contained in:
Classic298 authored and GitHub committed 2026-11-16 15:44:13 +09:00
1 parent 86aac87f83
commit 5f1d050ed8
1 file changed
+3 -3
+3 -3
View File
@@ -14177,9 +14177,9 @@
}
},
"node_modules/style-mod": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.3.tgz",
"integrity": "sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==",
"version": "4.1.4",
"resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.4.tgz",
"integrity": "sha512-XXWIQt633/EpAFx8aZDOTjBzrCaGmhvEQlQo6MVPfa2OzO2cWo+4hV9h+6UkHYlXGfy+ODXKUdP7Pthmcu5ATw==",
"license": "MIT"
},
"node_modules/style-to-object": {