-
Notifications
You must be signed in to change notification settings - Fork 73
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
WIP: Performance tuning: rendering worldmap objects #253
base: master
Are you sure you want to change the base?
Conversation
I was thinking about the leaflet cleanup as well. I like pulling it back out to a lib that can be more easily swapped for versions... I'm going to merge this into mine and give it a run. Thanks. |
share/frontend/nagvis-js/js/ViewMap.js 128 this.removeAllObjects() My maps aren't heavy enough to really see much performance change, I think, but no ill effects for sure. |
well. may have spoken too soon but haven't narrowed down when it happens. do a lot of zoom in and out with movement around and get a second copy of all the lines and objects overlayed. Seems to be related to zoom as I haven't been able to get it from just moving around and they seem to alway be different scales. Doesn't seem related to the ElementLine changes at least but it'll take a while to put these back in and out to narrow further. |
Doesn't seem to have related to the ViewMap changes. |
Seems to be in the ViewWorldmap changes. Another missing ; after this.last_zoom = g_map.getZoom() line 116 Adding back the this.render(); // re-render the whole map |
sorry for the run ons. and:
needs ; |
Hmm. And don't seem to be able to hover the lines or icons anymore. Reverting these changes completely at this point. Reverting ViewWorldmap.js got hover back as well. I'm going to leave currently with all of the changes except ViewWorldmap.js. Haven't seen any other ill effects at this point that way. |
Thank you @ekrichbaum for testing it too. I' got also double rendering issue, not easily reproducible so far; working on it. |
…too many usability problems.
I quit an attempt to optimize worldmap rendering. Although partial rendering after |
Shall we close the pull request? Or are there still some commits that we should take over? |
It's still to merge. Of the 4 planned enhancements (UI and call_ajax() synchronization, Avoid double render, Render less out-of screen objects, Newer leaflet) only "avoid double render" is reverted, and the rest is ready. The performance boost is just slight though. To really boost it, rendering of the worldmap objects would need complete rework and perhaps tighter integration with leaflet. Maybe later. |
We've fond dome minor compatibility problems with the new leaflet. Marking this |
Why?
It's slow. Typical workflow on the
worldmap
: zoom in, zoom in, zoom in, drag, drag, drag, zoom out ... had caused excessive browser load when re-rendering all the objects on the map.How?
call_ajax()
synchronization. After fast successive map moves, only last of (often overlapping in time) getMapObjects' results are being rendered.Avoid double render. After a map view is dragged (not zoomed), most of the objects stay visible. Only those new are rendered, and old (out of viewport) are removed.v0.7
tov1.6
.