Monaco perf improvement: Call updateOptions API only for props that have changed
vivek1729 opened this issue · comments
vivek1729 commented
We rely on the helpful updateOptions
API on the editor instance to update a generic set of options. Since, this is tied to the componentDidUpdate
lifecycle method, several calls to the underlying updateOptions
API can lead to potentially unwanted dom manipulations.
We can consider adding some checks before calling this API so that we pass in only those props that have actually changed since the last update:
nteract/packages/monaco-editor/src/MonacoEditor.tsx
Lines 365 to 370 in d2088d0