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


Hi Markus,

On Sat, Jun 4, 2011 at 8:04 PM, Markus Mohrhard
<markus.mohrhard@googlemail.com> wrote:

I would like to here any suggestions before I change anything UI related.

So, there are two things that I could see us changing.

One is to update the progress bar only once per sheet, instead of once
per column in each sheet.  I find the latter simply a bit silly, not
to mention it has terrible performance consequences.

Two is to change ScDocument::MoveTab to not instantiate the ScProgress
instance on every call (and destroys it), but to simply have the
caller do that while the method itself simply accepts a pointer to
that instance.  When a NULL pointer is passed, the method would simply
do its thing without even updating the progress bar.  This would allow
the caller to control how often the progress bar should be updated,
which allows the caller to e.g. update the progress bar on every 5
sheets while relocating 1000 sheets. etc.  That would also solve the
issue you had with the unit test code.

The key is to not eliminate the progress bar, but simply reduce the
frequency of updating which can be very expensive especially when
using GTK to draw the progress bar.

How does that sound?

P.S. We don't even use a ScProgress in ScDocument::CopyTab which should
normally need much more time

True.  I think the reason why MoveTab uses the progress bar may be
because it gets called repeatedly in a for-loop sometimes.  Still, the
current design can be improved for better performance (as I stated
above).

Kohei

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.