Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce memory allocation overhead in update generation code
Note that pugixml library allocates memory for a document in increments of 32KB pages and then manages smaller allocations (nodes or attributes) using these pages. Calling the reset method on a document frees all the pages. Hence a 32B page allocation/free happens for each config message sent to a client. Instead, removing the only child node of the document ensures that pugixml does only a single 32KB allocation per document and recycles the same memory when building the tree for each message. Change-Id: Id56d5ad6c45fc2b6bedfe402d4758b454efc183e Partial-Bug: 1602347
- Loading branch information