Yes, it is always planned to improve that but to be honest, is not high on our agenda right now, and also not sure if huge improvements are currently even possible.
What is planned is making it easier to load external nodes in the future. But until that is in place the memory usage will probably grow more as for some new integrations additional modules are needed and n8n will always need much more memory than if you would write a custom Node.js application. There is sadly always an overhead running a tool like n8n.
I think the regular startup - standby memory usage of n8n is fine.
However, memory usage grows a lot during processing of the messages.
I have workflows that download large jsons (4.5MB).
It goes through 6-8 nodes.
While processing memory consumption goes up to 2.8GB
I think two effects come into play.
Json-parse memory usage increase non-liniear
Every node in the workflow keeps itâs own copy loaded
Quick search about ânode json memoryâ (or similar things) will show few experiments that node seems to use much more memory for single large documents than chopping the same document into smaller parts.
This is perhaps a quick fix, that after a node has passed the message to the next node, it can clear itâs own data.
PS: My workaround was to split the workflow into two workflows.
Workflow B is started after Workflow A has finished. I kept running into dying n8n nodes.
That is not totally correct. By default do only references get passed around if possible. So it does not copy the data for every node. For that reason is it so important that nodes copy the data themself if they change it, because if they do not do it, it messes up the workflow.
What actually happens depends on the node and the set parameters if data gets copied or not.
One node which always copies all data is for example the Function-Node. The reason is that n8n does not know what is happening in there and to be sure it copies all the data.
The Set-Node on the other hand does copy the data depending on the setting. If it is set to âKeep Only Setâ it does not copy the data (as it creates a totally new item), if it is not set it copies it.