aboutsummaryrefslogtreecommitdiff
path: root/src/core/bufferfragment_p.h
diff options
context:
space:
mode:
authorMilian Wolff <mail@milianw.de>2014-06-18 13:57:35 +0200
committerMilian Wolff <mail@milianw.de>2014-06-18 13:57:35 +0200
commit9a5d6523689067a9cde717a8f375d4eca246b119 (patch)
tree11c0b46a78d23f9c02dcce558ccb7844c1970a76 /src/core/bufferfragment_p.h
parent474fcb9b379d392f44ef80380a7ac1b908965112 (diff)
downloadkconfig-9a5d6523689067a9cde717a8f375d4eca246b119.tar.gz
kconfig-9a5d6523689067a9cde717a8f375d4eca246b119.tar.bz2
Optimize KConfigGroup::exists and similar operations.
Before, these kind of read-only operations did a lot of allocations: 1) allocate a list of all sub groups 2) for the above, also allocate a sub-group match key 3) iterate over sub groups, allocate a list of all keys in there and then finally check whether that list is non-empty All of the above is now done without a single allocation, by simply iterating over the list of entries. Note: The whole list was iterated even before in allSubGroups. Now we still do that, but check for non-empty keys in the group or sub group directly. Much more efficient. Note2: While at it, allSubGroups is also optimized to not require the allocation of the subgroup match key. REVIEW: 118586 forward-port of commit eaffd50adfd7fcbeafadb0248904176808b4499d
Diffstat (limited to 'src/core/bufferfragment_p.h')
0 files changed, 0 insertions, 0 deletions