diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-27 15:57:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-28 07:42:19 +0100 |
commit | 9c5d33e3c9e4a680af61a9e7af8fa73d08b33834 (patch) | |
tree | 58f164297b31b0b5e31c2b4e6e0406cc7af70397 | |
parent | 42c758281dee346811326cc701a62f5d091db833 (diff) |
tdf#113539 Slow opening of ODT file containing a large table
I suspect that somebody has already fixed the bulk of this, since on my
machine, the opening time started as:
0m5.363s
After changing from std::set to o3tl::sorted_set in
SwAccessibleTableData_Impl, it dropped to:
0m4.372s
And then tweaking SfxSplitWindow::InsertWindow_Imp lowered it to:
0m4.030s
which seems perfectly acceptable to me.
Change-Id: I0c6123e99ab560742bd3dc97bb76666b48a3b1b6
Reviewed-on: https://gerrit.libreoffice.org/69862
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sfx2/source/dialog/splitwin.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/access/acctable.cxx | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index d9a50f003bbd..065ca5afde1a 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -698,9 +698,12 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl const * pDock, pEmptyWin->Actualize(); SAL_INFO("sfx", "SfxSplitWindow::InsertWindow_Impl - registering empty Splitwindow" ); pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign )->nVisible = SfxChildVisibility::VISIBLE; - pWorkWin->ArrangeChildren_Impl(); + // tdf#113539 FadeIn will call ArrangeChildren_Impl() for us, and avoiding extra calls to that + // can make a different to load times because it avoids extra accessibility calcs if ( bFadeIn ) FadeIn(); + else + pWorkWin->ArrangeChildren_Impl(); } else { @@ -716,9 +719,12 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl const * pDock, SAL_INFO("sfx", "SfxSplitWindow::InsertWindow_Impl - registering real Splitwindow" ); } pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign )->nVisible = SfxChildVisibility::VISIBLE; - pWorkWin->ArrangeChildren_Impl(); + // tdf#113539 FadeIn will call ArrangeChildren_Impl() for us, and avoiding extra calls to that + // can make a different to load times because it avoids extra accessibility calcs if ( bFadeIn ) FadeIn(); + else + pWorkWin->ArrangeChildren_Impl(); } pWorkWin->ShowChildren_Impl(); diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index 9df77fac8b9e..ef0bff3133b1 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -58,7 +58,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::accessibility; using namespace ::sw::access; -typedef std::set < sal_Int32 > Int32Set_Impl; +typedef o3tl::sorted_vector< sal_Int32 > Int32Set_Impl; typedef std::pair < sal_Int32, sal_Int32 > Int32Pair_Impl; const unsigned int SELECTION_WITH_NUM = 10; |