From 10c934147d469965dba6abc78efd02759a010b8e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 23 Apr 2019 09:26:46 +0200 Subject: tdf#113266 slow opening XLS with 45 MB drawing Some hot-spots around dynamic_cast of SdrHint, so avoid that by creating special SfxHintId::ThisIsAnSdrHint The most common CPU hot-spot was in SvxShape::Notify, the other changes are just for consistency. Also remove some dead code in ScShapeChildren, the Notify method was doing nothing useful. Change-Id: I696db1fcafc09bb10bf23ac673de292746141491 Reviewed-on: https://gerrit.libreoffice.org/71108 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/svl/hint.hxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/svl') diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx index 98d0ca81de55..708986e31631 100644 --- a/include/svl/hint.hxx +++ b/include/svl/hint.hxx @@ -112,6 +112,8 @@ enum class SfxHintId { SwDrawViewsCreated, SwSplitNodeOperation, SwSectionFrameMoveAndDelete, + + ThisIsAnSdrHint // used to avoid dynamic_cast }; template< typename charT, typename traits > @@ -190,6 +192,7 @@ inline std::basic_ostream & operator <<( case SfxHintId::SwDrawViewsCreated: return stream << "SwDrawViewsCreated"; case SfxHintId::SwSplitNodeOperation: return stream << "SwSplitNodeOperation"; case SfxHintId::SwSectionFrameMoveAndDelete: return stream << "SwSectionFrameMoveAndDelete"; + case SfxHintId::ThisIsAnSdrHint: return stream << "SdrHint"; default: return stream << "unk(" << std::to_string(int(id)) << ")"; } } -- cgit