SomeRanDev / Godot-Trail3D

A native Godot addon that adds a Trail3D node to Godot.
MIT License
3 stars 1 forks source link

Performance question #4

Open sweden-moose opened 5 months ago

sweden-moose commented 5 months ago

Hi, your readme says

This version is rewritten from GDScript to Rust, and it's optimized to remove the expensive list manipulations.

Does this optimization affects performance in a good way?

image Above you can see gdscript implementation from this gist for 300 moving nodes in one scene

image And this is rust implementation for same 300 moving nodes.

Test project (with my linux addon build): TestProject.zip

SomeRanDev commented 5 months ago

I downloaded the project and tried, but I wasn't able to replicate the results. The GDScript version seemed slower, but I wasn't sure? There seemed to be no difference. I was using 4.3beta.

There appears to be lag and peaks right at the start when all the objects are spawned, maybe using GDExtension makes the object spawning slower? Could you try object pooling and checking the Process Time after they have been spawned for a bit?

sweden-moose commented 5 months ago

I tried running project again and your implementation was like 20-30% faster, even on spawn. So, i think its resolved.