question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Render a large number of Features in a Layer simultaneously

See original GitHub issue

I’ve been using this library for a few weeks and I like it a lot. I have a question regarding Marker vs Feature.

So, I can render ~800 Features on my map without any problem. However, as @benrudolph mentioned in #457 , rendering ~800 Markers on the map slows my browser to a crawl.

One problem with using a combination of Layer and Feature is that not all the features are rendered to the map simultaneously – to see all 800 markers I have to zoom in very close and pan the map around. As you can see in the image below, if I’m zoomed out, only a small, seemingly random subset of the features I want to display are rendered.

screen shot 2017-12-28 at 12 17 55 am

I’d like to be able to render all 800 features on the map at once. If this isn’t possible, this is a little surprising to me. Rendering this many markers to a map is a very common use case. I was able to do it years ago using Google Maps, as is demonstrated in the image below, without slowing the frame rate of the browser significantly.

screen shot 2017-12-28 at 12 17 37 am

Thank you for your help!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
compwrightcommented, Jul 14, 2019
2reactions
tmcintirecommented, Sep 25, 2018

I have a similar performance problem. We are looking to switch over from Leaflet to MapBoxGL. In leaflet, when I instantiate a new Marker class I’m able to give it an HTML element to render as the marker, and using the leafletmarkerclusterer library am able to cluster those html elements. From there we use plain old javascript to update the markers as we need to, and its lightning fast.

In previous iterations, we used angular to render our markers, which was extremely while panning, zooming, and even slower when loading (you’re talking 9-10 seconds for a layer with 400 markers to appear, and during this time the user is blocked)

So, I think the performance issue here is that we are trying to render a react component for a marker, when a standard HTML element with plain old javascript would do the trick and be much, much faster. Is there/will there ever be a way to pass an html element into the cluster component instead of having to render a Marker component each time? I think that’s why the performance hit is so large. Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Preview and render with Multi-Frame Rendering
Multi-Frame Rendering makes After Effects faster. It impacts how fast your projects can render on your computer based on the number of CPU...
Read more >
Render Millions of Features in Your Maps - Esri
Take a large dataset into ArcGIS Online and create an awesome visualization of millions of points you can use in your web mapping...
Read more >
Batch or interactive render your render layers | Maya 2019
You can simultaneously set multiple layers to be batch renderable by selecting the layers and clicking . Clicking the icon in the state...
Read more >
Daz Studio pro Tips: Canvas - Rendering multiple layers ...
In this video we look at how to render out multiple layers from the same ... My channel features a lot of awesome...
Read more >
HUGE After Effects News - Multi-frame Rendering - YouTube
Download and install Adobe After Effects Beta to enable multi-frame rendering for use during export via the render queue (for now)!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found