Monaco perf improvement: Optimize editor.layout calls
vivek1729 opened this issue · comments
vivek1729 commented
The layout
method instructs the editor to remeasure itself and resize if the container has changed since the last update. Under the hood, the layout
method tries to call some core DOM apis to get the size of the container DOM element iff there are no params passed to this method.
nteract/packages/monaco-editor/src/MonacoEditor.tsx
Lines 387 to 388 in d2088d0
It might be worth exploring if this call is needed here and if we can optimize it by passing some expected height/width.