Comment 17 for bug 1602347

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/24213
Committed: http://github.org/Juniper/contrail-controller/commit/ffd723e4b991064f406d7e2644d67f8f76a193f2
Submitter: Zuul
Branch: master

commit ffd723e4b991064f406d7e2644d67f8f76a193f2
Author: Nischal Sheth <email address hidden>
Date: Fri Sep 16 09:09:36 2016 -0700

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