>  Thanks for your answer. I understand that SHOW would possibly make some
of the situations quicker.

  If you are just trying to make a cell visible, then yes.

> But even if GTK 3 is drawing the matrix twice, don't you think it is
quite weird that simple scrolling around elements that are not so complex
(graphically I mean) is that slow ?

  GTK 3 uses Cairo. And this means double coordinates for all primitives.
It is slow for this kind of redraw.

> I'm just trying to figure out what is happening when scrolling, except
drawing. Is IupMatrix doing some complex stuff when scrolled ?

  No, it is not.

  Maybe you could reduce the number of IupMatrix used, and think of another
strategy to reduce the amount of redrawing.

Best,
Scuri


Em dom., 3 de jan. de 2021 às 19:35, Johann Philippe <
johannphili...@yahoo.fr> escreveu:

> Hi Antonio,
> And happy new year !
>
>
> Thanks for you answer. I understand that SHOW would possibly make some of
> the situations quicker.
> But even if GTK 3 is drawing the matrix twice, don't you think it is quite
> weird that simple scrolling around elements that are not so complex
> (graphically I mean) is that slow ? I'm just trying to figure out what is
> happening when scrolling, except drawing. Is IupMatrix doing some complex
> stuff when scrolled ?
> I guess some profiling could be great here, since I'm quite sure it is
> note related to my particular use.
>
> Thanks anyway, it's great to hear you could investigate !
>
> Best regards.
>
> Johann
> Le dimanche 3 janvier 2021 à 19:53:18 UTC+1, Antonio Scuri <
> antonio.sc...@gmail.com> a écrit :
>
>
>   Hi,
>
>   The SHOW attribute will scroll only if the given cell is not visible.
>
>   The ORIGIN attribute always positions the given cell at the top left
> corner regardless if it was visible or not.
>
>   A matrix with lots of lines will be slow only if its lines are visible.
> The matrix renders only the visible cells.
>
>   Scrolling with the wheel is slow because it will redraw many times, one
> for every wheel event which is usually much more that the scrollbar itself
> being dragged.
>
>   Scrolling with ORIGIN shouldn't be a problem. One thing that occurs to
> me is that the scrollbar must be also updated, if you turn off the
> scrollbars the process may be faster, but you will be able to scroll only
> using the ORIGIN attribute. But you can turn it off only when
> performance is needed, for instance.
>
>   I notice that in GTK 3 a scroll is drawing the matrix twice. I don't
> think it is a GTK problem. It may be something related with the redraw
> function we use, but I couldn't solve it.
>
> Best,
> Scuri
>
>
> Em qua., 2 de dez. de 2020 às 12:27, Johann Philippe via Iup-users <
> iup-users@lists.sourceforge.net> escreveu:
>
> Duration is between 5 and 7 milliseconds per matrix when setting "ORIGIN"
> attribute.
>
> Le mercredi 2 décembre 2020 à 16:02:11 UTC+1, Johann Philippe via
> Iup-users <iup-users@lists.sourceforge.net> a écrit :
>
>
> Dear all,
>
> I'm using several IupMatrix (more than 10, can be up to 20) in my musical
> application (on Linux, mint 20), and those matrixes can have a lot of
> lines.
> I noticed that scrolling is a bit slow when I scroll with mouse wheel.
> And it's even worst when the scrolling is done programatically with the
> "ORIGIN" attribute.
> When I say slow, I mean it's more than a few milliseconds, which is a big
> deal in a musical software, where many graphic elements are redrawn at
> something like 30 frame per second. In some context, the matrixes "ORIGIN"
> attribute can be reset several times per second, which is slowing the other
> graphical elements.
> Is it related to the IupMatrix itself ?
> Is there a quicker way to scroll programatically?
> Is the "SHOW" attribute quicker ? And if so, I couldn't find a way to make
> it work.
>
> Thank you !
>
> Johann
> _______________________________________________
> Iup-users mailing list
> Iup-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/iup-users
> _______________________________________________
> Iup-users mailing list
> Iup-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
>
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to