To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=100910
                 Issue #|100910
                 Summary|slow SfxItemSet lookups ...
               Component|utilities
                 Version|OOO310m9
                Platform|Unknown
                     URL|
              OS/Version|All
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|PATCH
                Priority|P3
            Subcomponent|code
             Assigned to|cd
             Reported by|mmeeks





------- Additional comments from mme...@openoffice.org Tue Apr  7 08:59:23 
+0000 2009 -------
The IsA method is really fairly slow, and calls a great chain of other methods,
and more so as we inherit more deeply in svtools' rtti structure. Since
SfxVoidItem is not inherited from: a leaf node in the type hierarchy - we should
just check the type for this item.

This should save some millions of cycles in at least my use case - for a trivial
code change:

--- svtools/source/items1/itemset.cxx
+++ svtools/source/items1/itemset.cxx
@@ -541,7 +541,7 @@
                                                // Unterschiedlich vorhanden
                                                return SFX_ITEM_DONTCARE;
 
-                                       if ( (*ppFnd)->IsA(TYPE(SfxVoidItem)) )
+                                       if ( (*ppFnd)->Type() == 
TYPE(SfxVoidItem) )
                                                return SFX_ITEM_DISABLED;
 
                                        if (ppItem)

I attach a suitable callgrind screenshot.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@util.openoffice.org
For additional commands, e-mail: issues-h...@util.openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org

Reply via email to