Modify

Opened 18 months ago

Last modified 15 months ago

#7140 new defect

Improvements for /capabilities at startup

Reported by: bastiK Owned by: team
Priority: normal Component: Core
Version: Keywords:
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 17 months ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 18 months 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 17 months ago by simon04

comment:2 Changed 17 months ago by simon04

  • Summary changed from Improvements for /capabilities at startup to [Patch] Improvements for /capabilities at startup

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

comment:3 follow-up: Changed 17 months ago by stoecker

Looks good to me. Paul?

comment:4 in reply to: ↑ 3 Changed 17 months ago by bastiK

Replying to stoecker:

Looks good to me.

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

comment:5 Changed 17 months ago by simon04

In [4709/josm]:

see #7140 - cache the capabilities call using CacheCustomContent

comment:6 Changed 17 months ago by simon04

  • Summary changed from [Patch] Improvements for /capabilities at startup to Improvements for /capabilities at startup

:-)

comment:7 Changed 17 months ago by simon04

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

Related tickets are: #4614, #6823.

comment:8 Changed 17 months 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 16 months ago by bastiK

In [4809/josm]:

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

comment:10 Changed 15 months ago by simon04

#6037 is related.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team. Next status will be 'new'.
Next status will be 'needinfo'.The owner will change 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'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.