Modify

Opened 13 years ago

Last modified 7 years ago

#7140 new enhancement

Improvements for /capabilities at startup

Reported by: bastiK Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: api capabilities blacklist Cc: framm

Description

At the moment, there is no reason for the /capabilities request when JOSM starts. The intention is to read a blacklist like this one, but openstreetmap.org doesn't provide it at the moment. Here is a list of improvements, that would make this feature more transparent:

  • Fix timeout - at the moment JOSM can freeze for minutes, when there is a slow network connection (see #6823).
  • Don't run the request in main or event dispatch thread - should be done in the background.
  • For each server URL remember whether it serves a blacklist. Skip the request at start if it doesn't. (This information can be refreshed, when it is older than 2 months.)
  • Cache the capabilities locally. Only request at start when cache is missing or older than one week.

Attachments (1)

7140_cache.patch (6.0 KB ) - added by simon04 13 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 by simon04, 13 years ago

Cache the capabilities locally. Only request at start when cache is missing or older than one week.

This could be implemented without big efforts using CacheCustomContent.

by simon04, 13 years ago

Attachment: 7140_cache.patch added

comment:2 by simon04, 13 years ago

Summary: Improvements for /capabilities at startup[Patch] Improvements for /capabilities at startup

Patch attached for caching the capabilities using CacheCustomContent. Please take a look at it.

comment:3 by stoecker, 13 years ago

Looks good to me. Paul?

in reply to:  3 comment:4 by bastiK, 13 years ago

Replying to stoecker:

Looks good to me.

Dito. Nice trick with with generics in throws clause. :)

comment:5 by simon04, 13 years ago

In [4709/josm]:

see #7140 - cache the capabilities call using CacheCustomContent

comment:6 by simon04, 13 years ago

Summary: [Patch] Improvements for /capabilities at startupImprovements for /capabilities at startup

:-)

comment:7 by simon04, 13 years ago

bastiK, do we need/want to implement other features from your list?

Related tickets are: #4614, #6823.

comment:8 by bastiK, 13 years ago

Cc: framm added

Yes, 1. and 2. is a bug. (Point 3 is probably not so important, now that we have one week cache.)

There was a suggestion to serve the blacklist as part of the MotD. It seems that MotD is loaded in the background, so 2. might be solved in the process.

comment:9 by bastiK, 12 years ago

In [4809/josm]:

remove bogus message (no connection is established at this point) (see #7140)

comment:10 by simon04, 12 years ago

#6037 is related.

comment:11 by Don-vip, 7 years ago

Keywords: api capabilities blacklist added
Type: defectenhancement

comment:12 by stoecker, 7 years ago

Close the ticket?

The question is if special care for blacklists makes any sense any longer. It only contains Google for a long time and Google does no longer use TMS, so Google layers can't be used with JOSM anymore at all as far as I know.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to bastiK.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


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