-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Enhancement: Allow user to load incomplete relation members #2284
Conversation
# Implementation details: ## iD.ui.RawMemberEditor For each member in 'incomplete' state, a button is shown that allows user to re-load the relation and complete its members. This is done through context.connection().loadEntity().
So, performance wise, it depends on the API calls used Both the relation full and way full calls have been moved to cgimap and are much faster than they used to be. Most wiki documentation probably pre-dates that, not that over 300 members on a route relation is a good idea, but the issues for those downloading them are much less. The boundary for Germany, pretty much a worst case, took me under 30 seconds to download in testing. It used to time out at 5 minutes. For loading relation members, there are three strategies to get all of a relation
Given the move to cgimap, I recommend the first. The others are only worth it if you already have most of the relation, something that will not be the case for big relations. For small relations, the overhead of |
@pnorman Thanks for the insight! Yeah you're definitely right, API calls does feel speedy. So it does make sense to get the full relation call while not being too worried of downloading massive data, to a certain extent i guess. (Question: for boundary for Germany, how large of a download are we talking about here?) Though I have another concern with performance in terms of entities loaded into the iD.Graph. From what I understand, connection().loadEntity() eventually triggers So would there be any concerns with accumulatively loading massive chunk of data onto the graph in terms of client performance (browser slowdowns/crash)? Or is that a matter of restarting the browser if that happens? So far in my usage, I don't feel any penalty but I may have not used it for long enough. Thanks! |
Hey @sogko, thanks for working on this. This would be a nice feature and the approaches you and @pnorman have been discussing sound pretty good.
There could be. It would be good to look at some numbers from heap profiling of large relations. |
This PR has gone a bit stale - @sogko are you still interested in merging this? I think it would be a really useful feature. Are there any outstanding issues (other than changing the icon) that are holding this up? I could replace the icon with something that looks more "download-y". |
Any news on this ? |
Nope, news would be here. |
superseded by #5396 |
Description
This enhancement is to enable user to load incomplete relation members, shown as
<not downloaded>
iniD.ui.RawMemberEditor
.This is a simple change but enhances the user experience greatly, especially in managing relation entities.
By simply calling
connection.loadEntity(relationId)
, we can fill in the missing related entities (ways / nodes).Demo
Checkout feature branch feature:load-incomplete-members and edit the following relations to demonstrate typical relation member sizes:
http://localhost:8000/#background=Bing&id=r445764&map=20.00/103.90306/1.31981
http://localhost:8000/#background=Bing&id=r65074&map=19.00/2.56124/49.00988
Discussion
<not downloaded>
at first and possibly therole
. The user would have to load each one of them until he/she finds the member that he/she is looking for.Notes
jshint js/id/ui/raw_member_editor.js