bugGNU Octave - Bugs: bug #57385, Starting Pan/Zoom mouse...

 
 

bug #57385: Starting Pan/Zoom mouse interaction is slow with large figures

Submitter:  Pantxo Diribarne <pantxo>
Submitted:  Mon 09 Dec 2019 10:54:10 AM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Performance
Status:  Patch Submitted Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 10 Dec 2019 07:19:40 PM UTC, comment #7: 

I don't doubt that you and others see the delay. It might just be system specific.
Here, panning, zooming, or rotating starts pretty much immediately after I clicked in the axes.
But that shouldn't hold you back from committing your patch if it fixes the issue on your side.

Markus Mützel <mmuetzel>
Group administrator
Tue 10 Dec 2019 04:45:35 PM UTC, comment #6: 

Ok. I remember I have seen a comment on the help mailing list of someone who observed this bug as I do (I doubt I can find the post though). Just to try to make myself clear: the delay I observe is between the click (buttondown) and the first time mouse movements lead to an effect (drawing zoombox of panning or rotating).

Pantxo Diribarne <pantxo>
Group Member
Tue 10 Dec 2019 03:36:02 PM UTC, comment #5: 

I didn't see the slow or delayed panning that you describe in comment #0.
But everything still works fine for me with your patch.

Markus Mützel <mmuetzel>
Group administrator
Mon 09 Dec 2019 08:09:27 PM UTC, comment #4: 

As for the ButtonDownFilter pan object property, it will indeed have to be taken into account when we implement this feature.

Pantxo Diribarne <pantxo>
Group Member
Mon 09 Dec 2019 07:51:18 PM UTC, comment #3: 

I attached a patch that fixes the issue for me.

(file #48031)

Pantxo Diribarne <pantxo>
Group Member
Mon 09 Dec 2019 05:55:20 PM UTC, comment #2: 


>> Matlab also doesn't execute ButtonDownFcn callbacks by default if one of the figure modes (pan, zoom, or rotate3d) is selected.


I guess this answers my question. We have a "select_object" method which can be called to decide what graphics object is under the mouse pointer when a click happens (this is what I called "full" selection) or it can also return only the axes object onto which the click happenned (much faster). If we don't need to honor the buttondownfcn (and thus the currentobject) in zoom/pan/rotate mode, then we can call the fast version.  I'll provide a patch.

Pantxo Diribarne <pantxo>
Group Member
Mon 09 Dec 2019 05:40:22 PM UTC, comment #1: 

Matlab also doesn't execute ButtonDownFcn callbacks by default if one of the figure modes (pan, zoom, or rotate3d) is selected.

It allows to add a ButtonDownFilter function to the select if panning, zooming or rotating should NOT happen but instead the ButtonDownFcn should be called (e.g. [1]).

AFAICT, this isn't implemented yet. But maybe it needs to be considered for that change?

I also might have misunderstood what a "full" selection is.

[1] https://de.mathworks.com/help/matlab/ref/pan.html

Markus Mützel <mmuetzel>
Group administrator
Mon 09 Dec 2019 10:54:10 AM UTC, original submission:  

With the Qt toolkit, and especially when the size of the figure window is large, starting drawing a zoom box or panning an axes is slow. Steps to reproduce


hf = figure (); clf;
sombrero;
pan on
## Resize the figure window so that it is as large as the screen
## Try to start panning
## -> It takes 1-2 seconds before mouse movements lead to the desired effect


This time lag is not observed with the fltk toolkit.
The problem is that when clicking inside a Qt figure we determine what object was under the mouse. This "full" selection operation takes much time, even more for large figures, and I think it is unnecessary since I don't expect the currentobject to be modified while we are using Pan, Zoom, Text or Rotate mouse modes.

If you agree with the above, I'll provide a patch that fixes the issue by avoiding the full selection step.

Pantxo Diribarne <pantxo>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #48031:  bug57385.patch added by pantxo (4KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by pantxo (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-12-09 pantxo Attached File- Added bug57385.patch, #48031
        StatusConfirmed Patch Submitted

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code