Modify

Opened 10 years ago

Last modified 5 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 10 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 10 years ago by simon04

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.

Changed 10 years ago by simon04

Attachment: 7140_cache.patch added

comment:2 Changed 10 years ago by simon04

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 Changed 10 years ago by stoecker

Looks good to me. Paul?

comment:4 in reply to:  3 Changed 10 years ago by bastiK

Replying to stoecker:

Looks good to me.

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

comment:5 Changed 10 years ago by simon04

In [4709/josm]:

see #7140 - cache the capabilities call using CacheCustomContent

comment:6 Changed 10 years ago by simon04

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

:-)

comment:7 Changed 10 years ago by simon04

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

Related tickets are: #4614, #6823.

comment:8 Changed 10 years ago by bastiK

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 Changed 10 years ago by bastiK

In [4809/josm]:

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

comment:10 Changed 10 years ago by simon04

#6037 is related.

comment:11 Changed 5 years ago by Don-vip

Keywords: api capabilities blacklist added
Type: defectenhancement

comment:12 Changed 5 years ago by stoecker

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.
to The owner will be changed from team to the specified user.
The owner will change to bastiK
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.