diff options
author | Rüdiger Timm <rt@openoffice.org> | 2005-01-27 11:35:47 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2005-01-27 11:35:47 +0000 |
commit | 127f46a2fd832e989b203b591fc5c08f88ac78e5 (patch) | |
tree | 7370d8d512beba21407f4e3efdec5e783f2baf4b /cppuhelper | |
parent | 5bd25e1fa9c70907909ea437ad8effdfd0dc7830 (diff) |
INTEGRATION: CWS xmlperf01 (1.9.32); FILE MERGED
2005/01/14 11:28:53 sb 1.9.32.1: #i40644# Improve performance.
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/source/implbase_ex.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cppuhelper/source/implbase_ex.cxx b/cppuhelper/source/implbase_ex.cxx index 66c1add3df69..78b061c720c1 100644 --- a/cppuhelper/source/implbase_ex.cxx +++ b/cppuhelper/source/implbase_ex.cxx @@ -2,9 +2,9 @@ * * $RCSfile: implbase_ex.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: obo $ $Date: 2004-06-04 03:21:16 $ + * last change: $Author: rt $ $Date: 2005-01-27 12:35:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -196,6 +196,7 @@ bool recursivelyFindType( // the object layout, and that they contain slots for the inherited classes // in a specifc order. In theory, that need not hold for any given // platform; in practice, it seems to work well on all supported platforms: + next: for (sal_Int32 i = 0; i < type->nBaseTypes; ++i) { if (i > 0) { *offset += sizeof (void *); @@ -210,6 +211,12 @@ bool recursivelyFindType( { return true; } + // Profiling showed that it is important to speed up the common case + // of only one base: + if (type->nBaseTypes == 1) { + type = base; + goto next; + } if (recursivelyFindType(demandedType, base, offset)) { return true; } |