Viewer remounting on changing entities causing severe lag
See original GitHub issueHi 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:
After:
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:
- Created 5 years ago
- Comments:12 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Awesome thank you! I got it almost the speed I want.
PointPrimitive example:
Documentation: