#4037 closed enhancement (fixed)
[PATCH] LiveGps: Frequent position updates leech too much CPU on low-end devices
| Reported by: | casualwalker | Owned by: | casualwalker |
|---|---|---|---|
| Priority: | normal | Component: | Plugin |
| Version: | Keywords: | ||
| Cc: |
Description
LiveGps Plugin redraws the screen each time it receives a new set of data from GPSD, which is about once per second.
When JOSM runs on a low-end device (such as a netbook), JOSM reacts very sluggish to user-input, as all CPU power is consumed by frequent updates.
Proposed solution:
- LiveGPS suppresses update events, until a minimal amount of time has elapsed, by default this is set to 5 sec.
- This interval can be configures in a config value named "livegps.refreshinterval" (in milliseconds).
This was already mentioned in the Wiki, although this is not the right place...
http://wiki.openstreetmap.org/index.php/JOSM/Plugins/LiveGPS#TODOs
I already implemented this feature, it even worked outside ;-)
Patches will follow, as soon as I clean up the code a bit.
Attachments (2)
Change History (8)
comment:1 Changed 3 years ago by casualwalker
- Owner changed from team to casualwalker
comment:2 Changed 3 years ago by casualwalker
- Status changed from new to assigned
comment:3 Changed 3 years ago by casualwalker
- Resolution set to fixed
- Status changed from assigned to closed
If you have any questions re these patches or need another format, re-open this bug and ask me.
comment:4 Changed 3 years ago by stoecker
- Resolution fixed deleted
- Status changed from closed to reopened
- Summary changed from LiveGps: Frequent position updates leech too much CPU on low-end devices to [PATCH] LiveGps: Frequent position updates leech too much CPU on low-end devices
Don't close tickets until patches have been applied. Closed tickets are history. Nobody cares for them.
comment:5 Changed 3 years ago by stoecker
- Resolution set to fixed
- Status changed from reopened to closed
In [o18941].
Some rules for next time
- Use .diff or .patch as extension
- Only one patchfile
- Don't reformat code you did not change
- Don't leave pointless debug code inside
comment:6 Changed 3 years ago by casualwalker
Got myself a svn account and improved this feature some more:
- Config setting is in seconds
- Set to 0 disables the suppression
- each position from gpsd still will be added to the layer (and the track); so, when the display is eventually refreshed, you "suddenly" see a couple of new positions. Thus, no position is lost and JOSM is still responsive.



Patches will follow within the next few days.