mapbox / traffic-signals

Tool for mapping traffic signals and stop signs
https://mapbox.github.io/traffic-signals
4 stars 3 forks source link

Debug performance issues #3

Open ajithranka opened 7 years ago

ajithranka commented 7 years ago

The map is quite slow and eating up a lot of memory. I'm going to be spend some time trying to isolate the root cause. @geohacker @batpad if you have any suggestions on where i can look let me know!

Possible causes:

geohacker commented 7 years ago

Thanks for the ticket @ajithranka - I think this is crucial for us to figure out in the longer term. Here are some things we can look at:

ajithranka commented 7 years ago

There are five separate sections in the code that's layered on top of the map. Toggling them all off and adding them one-by-one gave me these numbers.

Section Memory usage
Base map ~350 MB
Base map + Mapillary ~600 MB
Base map + Tile Boundaries ~400 MB
Base map + OSM Restrictions ~420 MB
Base map + OSM Junctions (dataset) ~1.20 GB 😦

Switching to older versions of GL didn't really help much.

ridixcr commented 7 years ago

Hi guys!

Please the mapilary layer could only focus on showing around the detected points is that it is not necessary to show all nodes.

In osm-navigation-map make good use of this, so reduce memory usage.

seleccion_002

The laptop freezes and needs to be rebooted them every single time and it does not allow to work.

:pray: :bowing_man:

maning commented 7 years ago

@ridixcr Can you post browser/version?

ridixcr commented 7 years ago

seleccion_003

@maning

luiswalter commented 7 years ago

I have the same problem, my laptop heats up and automatically restarts when using the osm-traffic-signals program

chrome

@maning @Rub21 @ridixcr

ajithranka commented 7 years ago

@ridixcr @luiswalter Sorry for the delay on this. I can imagine how frustrating it is to work with a broken tool. But this is also a hard problem; I'm not entirely sure where the issue is my code.

I'll be spending some time tomorrow morning to get a workaround using the new version of the Mapillary api which has a separate traffic signals layer. That should help both improve the workflow and the performance. Until then, please bear with me.

ajithranka commented 7 years ago

Please the mapilary layer could only focus on showing around the detected points is that it is not necessary to show all nodes. In osm-navigation-map make good use of this, so reduce memory usage.

Unlike the signs in osm-navigation-map, Mapillary does not have a detected objects layer for traffic signals. So we can't really have a workflow similar to navigation map.

ajithranka commented 7 years ago

Next steps:

geohacker commented 7 years ago

Per chat, @ajithranka: