Modify

Opened 4 years ago

Last modified 16 months ago

#14003 new enhancement

Mouse moves trigger costly calculations to early

Reported by: GerdP Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: performance Cc: Klumbumbus

Description

Each mouse movement across the rendered data triggers a lot of costly calculations, this is done to highlite the object(s) under the cursor. I think this should only be done when the mouse stays at the same location for a while. Is there any option to configure this?

Attachments (1)

14003.patch (1.5 KB) - added by GerdP 16 months ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 4 years ago by Klumbumbus

Cc: Klumbumbus added

comment:2 in reply to:  description Changed 4 years ago by skyper

Replying to Gerd Petermann <gpetermann_muenchen@…>:

Is there any option to configure this?

See Display -> OSMData in preferences

comment:3 Changed 4 years ago by GerdP

Don't understand. I don't see an option to set a time. WHaat option will help me?

comment:4 in reply to:  3 Changed 4 years ago by skyper

Replying to Gerd Petermann <gpetermann_muenchen@…>:

Don't understand. I don't see an option to set a time. WHaat option will help me?

Sorry, only available option is to disable the highlighting completely.

comment:5 Changed 2 years ago by Don-vip

Keywords: performance added

Changed 16 months ago by GerdP

Attachment: 14003.patch added

comment:6 Changed 16 months ago by GerdP

The attached (experimental) small patch avoids a redraw in two situations when in Select Mode
1) Mouse is outside of the MapView and one of the special keys is pressed
(This is done by setting oldEvent = null in mouseExited(). Without this change highlighted elements change when you press e.g. Ctrl)
2) Mouse is moved quickly, there is no need to highlight something in this situation as the result is unpredictable.
I've added a log message to show how often this avoids the costly call of giveUserFeedback() and possibly the repaint.

I see no negative impact on user feedback, so this should just save a lot of CPU cycles which might help on battery driven machines.

The hard coded numbers work fine for me, I assume they should depend on e.g. screen resolution, something like "distance between mouse
events" > x % of screen resolution.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to GerdP
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.