How to temporise node spawn #41
-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Hello, happy to suggest a few solutions! Could you share a snippet of how you are currently loading the data? Also does the lag spike come from reading in the file or from generating the meshes with bind or bind instance? |
Beta Was this translation helpful? Give feedback.
-
Here is the current script with a sample dataset, I have received 20 different datasets, all in CSV format :'( You may notice that this code is heavely inspired by the sample though
|
Beta Was this translation helpful? Give feedback.
-
Sure for example
|
Beta Was this translation helpful? Give feedback.
-
Also I see you are using Typescript which I do not get a chance to test myself that often. If you see an issue or place our types can be improved please feel free to open an issue! Whenever you complete your application would love to see it in action in the show and tell section! |
Beta Was this translation helpful? Give feedback.
Thanks for sharing this sample! I managed to recreate your example and I have some suggestions you could try.
I separated the data processing and network code and ran the chrome performance profiler. The whole tasks takes 124ms and the data prep takes up about half of that time (54ms). So if possible pre-proccess those csv into the target json format before run time.
When setting lots of properties on lots of nodes its better to use .props() so that you only loop through the selected nodes list once. Also when using instances try to set as many properties as you can on the root node before instancing, since these properties will get copied anyways.
If there is an FPS issue on your d…