Page 1 of 1

UA server SDK cost so much memory

Posted: 17 Dec 2020, 03:10
by ston1309
We implement a server based ‘C++ Based OPC UA Server SDK’. And the server cost so much memory to create node module. Here are the codes:

UaNodeSetXmlParserUaNode *pXmlParser = new UaNodeSetXmlParserUaNode(sNodesetXmlFile, pNodeManagerCreator, new UaBase::BaseNodeFactory(), NULL);
opcServer.addModule(pXmlParser);


We used loading xml to create modules. Here is the node xml sample in the attachment. There are about 56000 nodes. When the UA server started, it will cost about 330M size of memory.
Actually, we will register 20 times of that sample, about 1 million nodes. It will cost about 6G size of memory. It’s so large. How to resolve it ? Is there some way to reduce the memory cost? Thanks.
Is there some way about lazy load? Client can get the whole node tree and the SDK server havn't register the whole node object. Do you know how to do it?

Re: UA server SDK cost so much memory

Posted: 20 May 2021, 16:05
by Support Team
Hello ston1309,

there was an issue in the XML importer that caused some memory not to be freed. That issue has been fixed in Version 1.7.4 of the SDK.
Please use the latest version and retry.