mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(editor): fix performance issues when opening node or editing code node with a lot of data (#4388)
* debounce clicks * debounce correctly * debounce resize * if initialized avoid * set watcher fixes * add deboucne for setting values * increase debounce * reset workspace for memory issues * address comment * decrease debounce time * decrease debounce time * clean up * revert back to trailing * support dbl
This commit is contained in:
@@ -73,7 +73,7 @@
|
||||
:mode="node.parameters.mode"
|
||||
:jsCode="node.parameters.jsCode"
|
||||
:isReadOnly="isReadOnly"
|
||||
@valueChanged="valueChanged"
|
||||
@valueChanged="valueChangedDebounced"
|
||||
/>
|
||||
|
||||
<div v-else-if="isEditor === true" class="code-edit clickable ph-no-capture" @click="displayEditDialog()">
|
||||
@@ -336,12 +336,14 @@ import { CUSTOM_API_CALL_KEY } from '@/constants';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { CODE_NODE_TYPE } from '@/constants';
|
||||
import { PropType } from 'vue';
|
||||
import { debounceHelper } from './mixins/debounce';
|
||||
|
||||
export default mixins(
|
||||
externalHooks,
|
||||
nodeHelpers,
|
||||
showMessage,
|
||||
workflowHelpers,
|
||||
debounceHelper,
|
||||
)
|
||||
.extend({
|
||||
name: 'parameter-input',
|
||||
@@ -922,6 +924,9 @@ export default mixins(
|
||||
|
||||
this.$emit('textInput', parameterData);
|
||||
},
|
||||
valueChangedDebounced (value: NodeParameterValueType | {} | Date) {
|
||||
this.callDebounced('valueChanged', { debounceTime: 100 }, value);
|
||||
},
|
||||
valueChanged (value: NodeParameterValueType | {} | Date) {
|
||||
if (this.parameter.name === 'nodeCredentialType') {
|
||||
this.activeCredentialType = value as string;
|
||||
|
||||
Reference in New Issue
Block a user