UA server SDK cost so much memory
Posted: 17 Dec 2020, 03:10
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?
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?