Opened 8 years ago
Last modified 6 years 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)
Change History (7)
comment:1 by , 8 years ago
Cc: | added |
---|
comment:2 by , 8 years ago
follow-up: 4 comment:3 by , 8 years ago
Don't understand. I don't see an option to set a time. WHaat option will help me?
comment:4 by , 8 years ago
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 by , 7 years ago
Keywords: | performance added |
---|
by , 6 years ago
Attachment: | 14003.patch added |
---|
comment:6 by , 6 years ago
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.
Replying to Gerd Petermann <gpetermann_muenchen@…>:
See Display -> OSMData in preferences