[Calc] Bad rendering performance of "selected copy" snake/circulation animation

Kohei Yoshida libreoffice at kohei.us
Wed Sep 30 05:49:22 PDT 2015

> On September 29, 2015 at 12:25 AM Sylvain R <ross_dev at hotmail.com> wrote:
> Hi,
> Sorry in advance if this is the wrong mailing list, I am basically trying to
> find a tiny bit of help to fix a rendering problem I have and hopefully submit
> a patch for it, or at least discuss the problem.
> I am having some serious rendering performance problems when I perform a copy
> of cells, for some time now, which is a problem as I use Libreoffice calc
> pretty much every day as part of my job (running Libreoffice
> 1:5.0.2~rc2-0ubuntu1~trusty2 on Ubuntu 14.04 64bit).
> I decided I could try to fix this problem myself as I am familiar with C++.

Excellent!  We appreciate your willingness to dive into the code.

> I am basically looking for a pointer as to where is the code that render the
> "copy cell circling effect". I am not sure how it is called, but this is what
> I am talking about at http://s14.postimg.org/6u32kqdq9

We (at least I) call it selection border for copied cell range.

> What I am trying to figure out:- Where is the code in charge of the rendering
> of the circulating selecion?- Where is the code that receives/handles the
> scrolling?

The state of this border is stored in ScGridWindow, as mpOOSelectionBorder data
member, which itself is an instance of ScOverlayDashedBorder.  All of these are
in the sc module.  You can run git grep for find these guys.

Now, the lower level rendering is done some place else, and you'll likely have
to move between svx (where the Sdr* classes live), basegfx and drawinglayer.
 And eventually the code path will reach in vcl to do the actual rendering.
 This is a high level overview of how drawing objects are rendered.

> I am really just looking for pointers (i.e. a class name or two) for where to
> start.

Hopefully the above is a good staring point.  If you encounter more specific
questions in some of these drawing layer code, feel free to post more questions.



Kohei Yoshida, LibreOffice Calc hacker

More information about the LibreOffice mailing list