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.

Viewer remounting on changing entities causing severe lag

See original GitHub issue

Hi all, I went from v0.2.2 to 1.0.0 didn’t change any code and started getting a severe drop in performance. These entities are being updated about every second to a new location so on zooming in they will be moving. Before: resium0 2 2

After: resium1 0 0 image

code:

const entities = Object.values(events).map((e) => {
    const lat = e.geometry.coordinates[0];
    const long = e.geometry.coordinates[1];
    const z = e.geometry.coordinates[2];
    const identifier = e.properties.identifier.toLowerCase();
    const color = entityColors[identifier]? entityColors[identifier] : '#FFFF00';

    return (
        <Entity
             key={e.properties.callsign}
             name={e.properties.callsign}
             position={Cartesian3.fromDegrees(lat,long,z)}
             point={{ pixelSize: 10,color: Color.fromCssColorString(color) }} />
    );
});

return(
<Viewer full>
    <Scene>
        <Camera onMoveEnd={this.onMoveEnd} ref={ref => this.camera = ref} >
            {entities}
        </Camera>
    </Scene>
</Viewer>
);

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
tmercadocommented, Jan 23, 2019

Awesome thank you! I got it almost the speed I want.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Viewer remounting on changing entities causing severe lag #46
Hi all, I went from v0.2.2 to 1.0.0 didn't change any code and started getting a severe drop in performance. These entities are...
Read more >
Setting state causes a UI lag in React - Stack Overflow
React will mount and unmount the component in DEV mode to validate effect cleaner and any side effect. I'm concerned about that subscribe ......
Read more >
Fixing Ticking Entity / TileEntity Errors | Minecraft - Nodecraft
A Ticking Entity crash is caused by a monster or creature that has become corrupted in the data files for the game.
Read more >
Valheim dedicated server lag - Reddit
Nothing absolutely huge and massive, and we are now starting to experience MAJOR server-side lag. Chests won't open, enemies run in place, ...
Read more >
Server Performance Guide
1 Notes; 2 World Pre-generation; 3 Java Launch Arguments; 4 Reduced View-Distance; 5 Tile-Entity and Entity Activation Ranges ...
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