Commit cd8d8ca
committed
Ensure Monaco layout() calls defer until cleared content is be unloaded
Previously, unloading an editor full of content could be expensive. My
beset guess here is that this was caused by Monaco being unmounted
(moving into a world where it was effectively tiny) but not yet updating
the content itself, and then relayout this being extremely expensive
(imagine calculating line wrapping on a 1px x 1px square). When
clearing, we now defer the relayout slightly, which seems to reliably
avoid this case and give us an instant relayout instead.1 parent 990cc2e commit cd8d8ca
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
264 | 270 | | |
265 | 271 | | |
266 | 272 | | |
| |||
0 commit comments