-
Notifications
You must be signed in to change notification settings - Fork 926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi fetch for objects histories #5008
Comments
Why would an editor want to get the history for lots of objects? |
Probably to check for conflicts. For example, try reverting 141361687 in JOSM and you will see that the last step it tries is to download the history of all thousands of objects |
At least this requirement looks like a duplicate of #130 |
This particular example. But this issue is also true for relations. For example, in route relations that often have many node members. I also have a suspicion that |
#130 only talks about way/:id/full/history. It doesn't really make a lot of sense to extend this idea to relation/:id/full/history like you've also noted, and that was not discussed there. I'm also wondering if it makes sense to request the full history in all cases. Maybe returning the last n versions would be more than sufficient. |
Can I just clarify here why multiple HTTP requests are a bad thing? With the API being served over HTTP/3, there's not much overhead for multiple separate parallel requests (a world of difference from HTTP 1.0 and 1.1 pipelining), and early responses (rather than waiting for an entire merged document to be assembled) might be useful to allow the client application to start processing the individual responses as they come in. Are there some disadvantages that I'm missing? |
Each fetch does carry some overhead in the browser. Firing off a thousand fetches in a browser app like Rapid or iD would fill up the browser's microtask queue. I guess I can do this though, if there's no other way. Thinking about it more, #5005 might be the cause of the "infiinite conflict checking" bug. |
I'll add that even though I use the latest version of Firefox, *iD editors only use http2. In http2, however, there is still parallelization, but what about JOSM, in which http2 is enabled by a separate plugin? |
We could also extend the current definition of how a version looks like: nodes?nodes=1v1,1v2,...2v10,2v11,2v12,.... Could be enhanced towards:
|
Problem
Currently, there is no way to request the history of multiple objects in a single request.
Description
Let's say you want to get the full history of changes to the line geometry. To do this, you need to get the history of the line + the history of all points that have ever entered the line. There seem to be only two ways to do this right now:
In theory, if the nodes versions are small (1-5), then loading with Multi fetch (~600 versions at a time), the second method will only need 4-17 requests
In practice, most likely you will not be able to get a boost due to #5005
But why all these difficulties? Why not have multi fetch for /history?
Something like: /nodes_histories?nodes=1,2,3
p.s. judging by, most likely, this method would also be useful for undo edits tools
Screenshots
No response
The text was updated successfully, but these errors were encountered: