mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(core): Lazy-load nodes and credentials to reduce baseline memory usage (#4577)
This commit is contained in:
committed by
GitHub
parent
f63cd3b89e
commit
b6c57e19fc
@@ -1,4 +1,4 @@
|
||||
import { set } from 'lodash';
|
||||
import set from 'lodash.set';
|
||||
|
||||
import {
|
||||
ICredentialDataDecryptedObject,
|
||||
@@ -805,8 +805,6 @@ class NodeTypesClass implements INodeTypes {
|
||||
},
|
||||
};
|
||||
|
||||
async init(nodeTypes: INodeTypeData): Promise<void> {}
|
||||
|
||||
getAll(): INodeType[] {
|
||||
return Object.values(this.nodeTypes).map((data) => NodeHelpers.getVersionedNodeType(data.type));
|
||||
}
|
||||
@@ -825,7 +823,6 @@ let nodeTypesInstance: NodeTypesClass | undefined;
|
||||
export function NodeTypes(): NodeTypesClass {
|
||||
if (nodeTypesInstance === undefined) {
|
||||
nodeTypesInstance = new NodeTypesClass();
|
||||
nodeTypesInstance.init({});
|
||||
}
|
||||
|
||||
return nodeTypesInstance;
|
||||
|
||||
Reference in New Issue
Block a user