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


Hi,

Has anybody any clue why svtools::EditBrowseBox::IsCursorMoveAllowed
needs to call rWindow.Paint()? It causes some pretty stupid behaviour
in base, namely:

1) Open a big table (hundreds of rows)
2) Only the first 40 to 100 rows are fetched into the cache and shown
   (depending on screen / window size).
3) Move to last row (click on icon |>|)
4) The last 40 to 100 rows are fetched into the cache; the data of the
   first 40/100 rows is pushed out of the cache.
5) The first 40 to 100 rows are fetched, just so that the call to
   rWindow.Paint() can do its job, because they are not in the cache
   anymore (!). The last 40/100 rows are pushed out of the cache.
6) The last 40 to 100 rows are fetched into the cache and displayed;
   the first 40/100 rows are pushed out of the cache *again*.

Steps 5 and 6 are obviously *very* stupid.

If I apply the attached patch, things get faster in Base (the
procedure stops at step 4), but have I broken something else? I don't
really have a clue.

This function, by name, looks like a purely "informative" function,
that shouldn't really have any side effect, but it seems like it has
several :-(

-- 
Lionel
From 04c9e9d42b7340c29a11c88a866cd6a66ed1a6c2 Mon Sep 17 00:00:00 2001
From: Lionel Elie Mamane <lionel@mamane.lu>
Date: Wed, 18 Jul 2012 19:34:19 +0200
Subject: [PATCH] why the hell does this need to paint?

Problematic for Base because when moving, it causes:
1) Fetch new data
2)Fetch old data
3)Fetch new data
Obviously, 2) and 3) are completely pointless

Change-Id: Ie3cc4f13b0b033965e51ced0eb3700bd2aad8028
---
 svtools/source/brwbox/editbrowsebox.cxx |   13 -------------
 1 file changed, 13 deletions(-)

diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 42f3158..ba536e4 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -929,19 +929,6 @@ namespace svt
         if (nNewRow != nEditRow)
         {
             Window& rWindow = GetDataWindow();
-            // don't paint too much
-            // update the status immediatly if possible
-            if ((nEditRow >= 0) && (GetBrowserFlags() & EBBF_NO_HANDLE_COLUMN_CONTENT) == 0)
-            {
-                Rectangle aRect = GetFieldRectPixel(nEditRow, 0, sal_False );
-                // status cell should be painted if and only if text is displayed
-                // note: bPaintStatus is mutable, but Solaris has problems with assigning
-                // probably because it is part of a bitfield
-                pTHIS->bPaintStatus = static_cast< sal_Bool >
-                    (( GetBrowserFlags() & EBBF_HANDLE_COLUMN_TEXT ) == EBBF_HANDLE_COLUMN_TEXT );
-                rWindow.Paint(aRect);
-                pTHIS->bPaintStatus = sal_True;
-            }
 
             // don't paint during row change
             rWindow.EnablePaint(sal_False);
-- 
1.7.10


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.