From eea8fa64ab27854b71f46ef143e35b6c9acbba14 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Fri, 5 Jun 2015 01:45:31 +0300 Subject: QSBatchRenderer: Replace Node::children QList with a singly linked list. This reduces transient allocations by 10mb on the Rectangle creation benchmark, at the cost of an additional two pointers per shadow node (and just that pointer -- no additional allocation ala QList is required, so this will actually end up around the same size if not better.) Change-Id: I6c25c93fe31ed892e3c42ed66d6c6656e5d7b38a Reviewed-by: Gunnar Sletta --- src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h') diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h index 8cd9e7e3ff..4a819a5fa5 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h @@ -1,6 +1,8 @@ /**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2014 Jolla Ltd, author: +** Copyright (C) 2015 Robin Burchell ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the QtQuick module of the Qt Toolkit. @@ -438,6 +440,9 @@ struct Node : sgNode(0) , parent(0) , data(0) + , firstChild(0) + , nextSibling(0) + , lastChild(0) , dirtyState(0) , isOpaque(false) , isBatchRoot(false) @@ -447,7 +452,9 @@ struct Node QSGNode *sgNode; Node *parent; void *data; - QList children; + Node *firstChild; + Node *nextSibling; + Node *lastChild; QSGNode::DirtyState dirtyState; -- cgit v1.2.3