Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#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 Milestone:
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)

Patch_LiveGpsSuppressor.java (3.4 KB ) - added by casualwalker 15 years ago.
Patch File LiveGpsSuppressor.java
Patch_LiveGpsAcquirer.java (17.6 KB ) - added by casualwalker 15 years ago.
Patch for LiveGpsAcquirer.java

Download all attachments as: .zip

Change History (8)

comment:1 by casualwalker, 15 years ago

Owner: changed from team to casualwalker

comment:2 by casualwalker, 15 years ago

Status: newassigned

Patches will follow within the next few days.

by casualwalker, 15 years ago

Patch File LiveGpsSuppressor.java

by casualwalker, 15 years ago

Attachment: Patch_LiveGpsAcquirer.java added

Patch for LiveGpsAcquirer.java

comment:3 by casualwalker, 15 years ago

Resolution: fixed
Status: assignedclosed

If you have any questions re these patches or need another format, re-open this bug and ask me.

comment:4 by stoecker, 15 years ago

Resolution: fixed
Status: closedreopened
Summary: LiveGps: Frequent position updates leech too much CPU on low-end devices[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 by stoecker, 15 years ago

Resolution: fixed
Status: reopenedclosed

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 by casualwalker, 15 years ago

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain casualwalker.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.