perf: typing in the chat input no longer freezes after pasting large text (#33729)

Converting 16,000 pasted lines to Markdown now takes 74 ms instead of 8.6 seconds, with byte-identical output. The converter got about 4x slower each time the text doubled, so every keystroke in the chat input after a large paste took seconds; its latest release fixes that and this is a plain version bump.

| Pasted lines | Before | After |
|---|---|---|
| 16,000 | 8,634 ms | 74 ms |
| 8,000 | 2,232 ms | 39 ms |
| 4,000 | 575 ms | 17 ms |
| 1,000 | 31 ms | 16 ms |

Related to #12087.
This commit is contained in:
Classic298
2026-11-05 06:38:33 +09:00
committed by GitHub
parent 5687972803
commit 2e95de4867
2 changed files with 9 additions and 5 deletions
+8 -4
View File
@@ -105,7 +105,7 @@
"svelte-sonner": "^0.3.19", "svelte-sonner": "^0.3.19",
"three": "0.186.1", "three": "0.186.1",
"tippy.js": "^6.3.7", "tippy.js": "^6.3.7",
"turndown": "^7.2.0", "turndown": "^7.2.5",
"turndown-plugin-gfm": "^1.0.2", "turndown-plugin-gfm": "^1.0.2",
"undici": "^7.28.0", "undici": "^7.28.0",
"uuid": "^11.1.1", "uuid": "^11.1.1",
@@ -14715,12 +14715,16 @@
} }
}, },
"node_modules/turndown": { "node_modules/turndown": {
"version": "7.2.2", "version": "7.2.5",
"resolved": "https://registry.npmjs.org/turndown/-/turndown-7.2.2.tgz", "resolved": "https://registry.npmjs.org/turndown/-/turndown-7.2.5.tgz",
"integrity": "sha512-1F7db8BiExOKxjSMU2b7if62D/XOyQyZbPKq/nUwopfgnHlqXHqQ0lvfUTeUIr1lZJzOPFn43dODyMSIfvWRKQ==", "integrity": "sha512-EKZvCCFHh8sWttpAMs10U6niZFJ2cpz8LkCPlylxoG4JcHF50J7EHnnBW3AY1qXtUMu7kDjCp7dnggB1sIbqEQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@mixmark-io/domino": "^2.2.0" "@mixmark-io/domino": "^2.2.0"
},
"engines": {
"node": ">=18",
"npm": ">=9"
} }
}, },
"node_modules/turndown-plugin-gfm": { "node_modules/turndown-plugin-gfm": {
+1 -1
View File
@@ -157,7 +157,7 @@
"svelte-sonner": "^0.3.19", "svelte-sonner": "^0.3.19",
"three": "0.186.1", "three": "0.186.1",
"tippy.js": "^6.3.7", "tippy.js": "^6.3.7",
"turndown": "^7.2.0", "turndown": "^7.2.5",
"turndown-plugin-gfm": "^1.0.2", "turndown-plugin-gfm": "^1.0.2",
"undici": "^7.28.0", "undici": "^7.28.0",
"uuid": "^11.1.1", "uuid": "^11.1.1",