From c7cb92f43f97ef5558eee0d7be6f18192134f3ec Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sun, 12 Apr 2015 02:50:18 +0200 Subject: Replace NodeVector by ManagedVector where NodeVector functionality is not needed. Reduces calls to "Manager.registerEvent" to <10% of original value --- src/core/parser/stack/DocumentHandler.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/parser/stack') diff --git a/src/core/parser/stack/DocumentHandler.cpp b/src/core/parser/stack/DocumentHandler.cpp index ce5d8a2..e6af615 100644 --- a/src/core/parser/stack/DocumentHandler.cpp +++ b/src/core/parser/stack/DocumentHandler.cpp @@ -144,7 +144,7 @@ void DocumentChildHandler::pushScopeTokens() // Fetch the current scope stack and search the first non-transparent field // or structure - const NodeVector &stack = scope().getStack(); + const ManagedVector &stack = scope().getStack(); for (auto sit = stack.crbegin(); sit != stack.crend(); sit++) { Rooted nd = *sit; @@ -586,7 +586,7 @@ bool DocumentChildHandler::startToken(Handle node) EndTokenResult DocumentChildHandler::endToken(Handle node, size_t maxStackDepth) { // Fetch the current scope stack - const NodeVector &stack = scope().getStack(); + const ManagedVector &stack = scope().getStack(); bool found = false; // true once the given node has been found bool repeat = false; @@ -686,7 +686,7 @@ bool DocumentChildHandler::fieldStart(bool &isDefault, size_t fieldIdx) preamble(parentNode, dummy, parent); - NodeVector fields = + ManagedVector fields = parent->getDescriptor()->getFieldDescriptors(); if (isDefault) { @@ -780,7 +780,7 @@ bool DocumentChildHandler::data() // Search through all permitted default fields of the parent class that // allow primitive content at this point and could be constructed via // transparent intermediate entities. - NodeVector defaultFields = field->getDefaultFields(); + ManagedVector defaultFields = field->getDefaultFields(); // Try to parse the data using the type specified by the respective field. // If that does not work we proceed to the next possible field. -- cgit v1.2.3