This is an automated email from the ASF dual-hosted git repository.

erikrit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new f9c8ca5  [SQL Lab] Improve autocomplete performance (#9064)
f9c8ca5 is described below

commit f9c8ca5df2457a541f70923a406719c3706c9d6d
Author: Erik Ritter <[email protected]>
AuthorDate: Sun Feb 2 09:13:25 2020 -0800

    [SQL Lab] Improve autocomplete performance (#9064)
---
 superset/assets/src/SqlLab/components/AceEditorWrapper.jsx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/superset/assets/src/SqlLab/components/AceEditorWrapper.jsx 
b/superset/assets/src/SqlLab/components/AceEditorWrapper.jsx
index 3c2101e..aa31827 100644
--- a/superset/assets/src/SqlLab/components/AceEditorWrapper.jsx
+++ b/superset/assets/src/SqlLab/components/AceEditorWrapper.jsx
@@ -155,7 +155,12 @@ class AceEditorWrapper extends React.PureComponent {
         });
       },
     };
-    const words = this.state.words.map(word => ({ ...word, completer }));
+    // Mutate instead of object spread here for performance
+    const words = this.state.words.map(word => {
+      /* eslint-disable-next-line no-param-reassign */
+      word.completer = completer;
+      return word;
+    });
     callback(null, words);
   }
   setAutoCompleter(props) {

Reply via email to