Commit 717c81e
authored
Make popup-replace-displayable much faster
One of my users reported a performance bug, which I tracked down to `popup-replace-displayable` (gcv/julia-snail#110).
Calling `popup-replace-displayable` takes ~3 seconds on a string of about 8000 characters on my system, and becomes much slower on larger inputs.
The attached PR eliminates the large number of string concatenations and significantly improves the function's performance.1 parent c303445 commit 717c81e
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
248 | | - | |
| 247 | + | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
255 | | - | |
| 254 | + | |
| 255 | + | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| |||
0 commit comments