nteract / nteract

📘 The interactive computing suite for you! ✨

Home Page:https://nteract.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Monaco perf improvement: Optimize editor.layout calls

vivek1729 opened this issue · comments

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.

// Tells the editor pane to check if its container has changed size and fill appropriately
this.editor.layout();

It might be worth exploring if this call is needed here and if we can optimize it by passing some expected height/width.