this post was submitted on 28 Mar 2026
1 points (100.0% liked)

OpenAstra: the open source space game

14 readers
1 users here now

This community to discuss the Open Astra space game

founded 2 months ago
MODERATORS
 

Whatever, i prefer C++ to Godot, i am more familiar and anyway backend development feels just more interesting.

Well, it seems i was wrong in using a std::map<std::string, DataItem> to store dataitems. A quick valgrind profiling proved that 90% of the server load happens within the std library manipulating string objects. Go figure.

I should have predicted that, but somehow all this new C++17 stuff lead me to believe differently.

So i am now moving to a std::vector approach and a numeric index instead of strings.

So now you will need to convert the dataitem name to index, store the index for future reference, and then use the index for a super fast direct access trough the std::vector.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here