Modify

Opened 8 weeks ago

Closed 12 days ago

Last modified 11 days ago

#23645 closed task (fixed)

[patch] ChangesetCache: Is it useful as it is? Why isn't it always used?

Reported by: GerdP Owned by: team
Priority: normal Milestone: 24.06
Component: Core Version:
Keywords: changeset cache Cc:

Description

Just some thoughts...
We have a lot of dialogs which handle changeset data, but only some use the in-memory cache implemented with class ChangesetCache. I wonder if this is intended or not. We also have a lot of different implementations to download changeset data.
We have at least three dialogs:

  • History Browser (HistoryBrowserDialog)
  • Changeset Manager (ChangesetCacheManager)
  • Changesets side pane (ChangesetDialog)

Each seems to implement methods to download changeset data and some seem to use multifetch ignoring the cache while others use the cache but fill it only with singe GET requests.
Quite confusing!
Esp. the Histoy Browser bypasses the cache and possibly downloads huge amounts of data, e.g. when the user browses the history of a complex route relation with many members and many versions.

Besides that we have the reverter plugin which implements its own set of tasks to download history data and I think it also always bypasses the cache.

My conclusion so far: The cache is not very useful as it is, but a better implementation using a disk cache could help to prevent hitting the rate limits.

Attachments (1)

23645.patch (2.2 KB ) - added by GerdP 8 weeks ago.
use/update ChangesetCache when downloading changeset in HistoryBrowser

Download all attachments as: .zip

Change History (11)

comment:1 by stoecker, 8 weeks ago

I'd say. Legacy code ;-)

comment:2 by GerdP, 8 weeks ago

There's also a problem with the id of a changeset. In most places we store it as int, in others we use long, e.g. HistoryOsmPrimitive. Seems useless when class Changeset uses int, right?

comment:3 by gaben, 8 weeks ago

Keywords: changeset cache added

comment:4 by gaben, 8 weeks ago

Marcello noticed this as well sometime ago, see ticket:21570#comment:13.

by GerdP, 8 weeks ago

Attachment: 23645.patch added

use/update ChangesetCache when downloading changeset in HistoryBrowser

comment:5 by gaben, 3 weeks ago

Summary: ChangesetCache: Is it useful as it is? Why isn't it always used?[patch] ChangesetCache: Is it useful as it is? Why isn't it always used?

comment:6 by stoecker, 3 weeks ago

Milestone: 24.06

comment:7 by GerdP, 12 days ago

Resolution: fixed
Status: newclosed

In 19098/josm:

fix #23645: ChangesetCache: Is it useful as it is? Why isn't it always used?

  • use/update ChangesetCache when downloading changeset in HistoryBrowser

comment:8 by GerdP, 12 days ago

I have no idea how much work it would be to change the field HistoryOsmPrimitive.changesetId from long to int.
HistoryOsmPrimitive is used in plugins, at least reverter and undelete and I assume we would see binary incompatibilities if we change the field in core.
Same problem with HistoryOsmPrimitive.version (also long instead of int)
I am not sure but I think the problem is small, it seems instances of HistoryOsmPrimitive are only stored temporary.

in reply to:  8 comment:9 by gaben, 12 days ago

Replying to GerdP:

I assume we would see binary incompatibilities if we change the field in core

Bump min version? DevelopersGuide/DevelopingPlugins#ThemanifestfileforaJOSMplugin

comment:10 by GerdP, 11 days ago

Yes, sure, we could do that, but the benefit seems very small and thus I see no need to work on the change as long as we don't start to store instances of HistoryOSMPrimitive in a cache.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.