Closed oscar134 closed 4 years ago
Yes! We can indeed improve our management of the resources. We could reimplement that idea we had of the memoiser not for points but for routes this time.
But then, the request should also take place since we need to check whether existing routes are still inside the POD and that new ones could have been added. I mean, this is too much thinking forward, but sooner or later this will generate problems.
I am certain that route points' elevation is calculated only once, when the route is created. I did that to avoid extra waiting times. @oscar134
Yes. Elevation is calculated once only. But I think we can solve the RouteList problem fetching it once. Now:
We can simply
That is genius. Didn't think about that in the first place. But what would happen if the application is closed just after creating it. Do we have the ability to recover a lost route?
Maybe creating a file with not yet uploaded routes and once uploaded those can be removed. So we have some sort of serialisation mechanism. What do you think?
I think a file per non uploaded route would suffice, just an idea that came to my mind
That is a good option, but requires some time to be done. If we have time we should do that but seems dificult. Fast option is warn the user "Hey, a route is uploading. If you close now you can lost it" and then tell him when the route has finally been uploaded.
Hmm... Yeah making them guilty of losing their own routes seems reasonable enough. :_)
Yes indeed we can do that. As you say creating files would cost too many resources. And we already have some delay problems to tackle.
Another idea could be asking for the elevation to the api while the user it's creating the route. With this approach we can gain two things:
Hmm I only see a problem with that, we need to reload some component of the page, and I am afraid that is not possible without reloading the complete page.
It it because we'd need to modify the state of the component that holds the whole view as we have it now. However, as we modify its interface layout with #98. We can encapsulate that single component to view already created points so that we can reload its state without doing so over the whole screen. What do you think?
Why do you need to reload all the view? I was just thinking on adding the already created ElevationChart component and adding elevations to it dynamically. Maybe I'm not getting the point.
I'm sorry, I think I didn't make myself clear. What I ment is that as we have the component now, we'd need to modify the elevation chart to isolate that functionality you want inside such component.
This way, we wont need to reload the whole RouteCreation window. I mean, I was just following your reasoning again.
Maybe we're talking about different things. I was saying creating the elevation chart while creating the route in the RouteCreation View, not in the InfoView.
Gosh... It's no use... With InfoView I meant RouteCreation. I'm sorry about that. :_( I have already edited the comment.
No problem. The elevation chart is almost isolated. It contains in the state the array of points painted in the chart. I think that adding a method in the component which adds a point to that array is enough. The problem would be treating the RouteWaypoints out of the MyRoute, to get each of the elevations individually.
We have to remember solving #161 (Elevation Chart Problem) issue when redisgning all this.
Fixed! Solved on #177
We have some delay problems especially when loading the routes. Apart from loading them from the POD (which is a slow operation itself) we also do everytime they're fetched:
I'm not sure about this, but I think they're re-fetched everytime the InfoView is rendered. Couldn't we mantain the information from previous renders. Also, couldn't we use some tools to check where we have the bottleneck? I know this is a difficult issue, but I think it's worthy in order to improve usability.