Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On 06/08/2011 06:40, Andrew Douglas Pitonyak wrote:
<snip>
Removed sheets may have references, a new sheet can not have any
references nor is it referenced.

bAC = isAutomaticCalculationEnabled()
doc.enableAutomaticCalculation(False)
do_stuff
doc.enableAutomaticCalculation(bAC)

Thanks Andreas,

I've done that but the problem persists.  I also made another
observation. One of the reserved sheets have formulas spanning about
10columns by 1750rows (some of them having up to 4-6levels of nested
'IF's with conditional formats). When I remove that sheet, the macro
executes instantly.

What I don't understand is why Calc still computes that sheet while
deleting other sheets. The macro makes no reference to it and it
doesn't reference the deleted sheets.  The 'culprit' sheet uses named
cell refs but all within itself except one cell that references a
cache sheet which never gets deleted. More baffling is that it happens
with AutomaticCalculation set to False.

I wonder if watching the huge range with a  listener will produce
better performance results.

Perhaps you can also add

doc.lockControllers()

do something

doc.unlockControllers()


Thanks Andrew,

I've tried that.  No Joy :(

I removed formulas from the 'Culprit' sheet between Row11 and Row 1760,
ran the sheet-creation/deletion macro, and the speed was excellent.  So
it seems OOo/Libreoffice is iterating those cells at each sheet
deletion.  *That is not good*. Either the 'IF' formula statements
attract some performance hits or the named-referencing is doing
something weird.

I still have one formula summing the 1750rows ... and the macro runs
fine.  Looks like I have to deduce some kind of algorithm to avoid the
'IF's or whatever is causing this drag.


-- 
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.