Hi Kohei,

Using unlockController/lock brought down the time from 12sec to 3sec. Using 
DataArray brought it down to 14ms!
 Thanks for the tips. Great thing about starting with bad code is that I get to 
feel happy when it improves :-)

Hi Michael,

Who would have thought it was a script :-) Maybe 0 bytes callgrind should have 
given me a hint.
I am running callgrind now. Although, I don't need to based on above numbers, I 
am sure I'll write the next code as badly and will need it soon.
I never said in the email that I was running the wrapper but you figured it out 
anyway.
Thanks for catching it.

You guys are great.
Neeraj

-----Original Message-----
From: Michael Meeks [mailto:michael.me...@suse.com]
Sent: Thursday, January 10, 2013 11:34 AM
To: Rai, Neeraj [ICG-MKTS]
Cc: 'libreoffice@lists.freedesktop.org'; Kohei Yoshida
Subject: Re: [libreoffice-dev] - questions about calc extension


> > What's your hunch about how long it should take to update 60K cells with 
> > {getCellByPosition(ii,jj) and setValue() } ?

        It should be ~instant - sub-second anyhow; it's an analog of loading
values from ODS. Kohei's suggestions are great:

> On Thu, 2013-01-10 at 10:59 -0500, Kohei Yoshida wrote:
> 2) Try lockControllers() and unlockControllers() to disable/enable
> repainting while updating cell values.  The example of these methods
> should be in my xcalc.cxx file I referenced earlier.

        You'd need to run callgrind like this:

export OOO_DISABLE_RECOVERY=1
valgrind --tool=callgrind --simulate-cache=yes --dump-instr=yes ./soffice.bin

        ie. on the soffice.bin not the wrapper script ;-)

        HTH,

                Michael.

--
michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to