From 38ae35db26cd5bed2eabc90e1a02afeb4e0eff54 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 10 Jul 2016 20:02:50 +0200 Subject: tdf#84635 - Slow layout of large tables Based on suggestion from Aron Budea. And do something similar to most other places keeping vectors of weak references where the code looks like it will hold more than a few entries. Measurements: the 26 page file file takes 51s without my path 15s with this patch the 69 page file file takes 5m28 without my path 51s with this patch the 84 page file file takes 8m28 without my path 58s with this patch Change-Id: I8da94c525fc73ebd969e0343c6f074be4f0063b1 Reviewed-on: https://gerrit.libreoffice.org/27093 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/classes/sbunoobj.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'basic') diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 370ae2018a4e..21be5c9dee43 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -4576,13 +4576,9 @@ void disposeComVariablesForBasic( StarBASIC* pBasic ) ComponentRefVector::iterator itCRV; for( itCRV = rv.begin() ; itCRV != rv.end() ; ++itCRV ) { - try - { - Reference< XComponent > xComponent( (*itCRV).get(), UNO_QUERY_THROW ); + Reference< XComponent > xComponent( (*itCRV).get(), UNO_QUERY ); + if (xComponent.is()) xComponent->dispose(); - } - catch(const Exception& ) - {} } delete pItem; -- cgit