Guild icon
Teeworlds
discord.gg/teeworlds / development
For discussions around the development of the official Teeworlds
Between 2019-05-03 00:00:00Z and 2019-05-04 00:00:00Z
Avatar
regarding void CPlayer::Snap(int SnappingClient), is the current instance Player that receives the Snapshot or the passed SnappingClient that receives the snapshot?
Avatar
LordSk 🦋 2019-05-03 09:49:13Z
@jxsl13 The SnappingClient
Avatar
So I was doing some test with a lot of dummies and ran into performances issues. Naturally I did some profiling and SnapFindItem was among the top culprits (it is called twice per client every frame to render players for example). And indeed it was searching linearly into data that wasn't structured to be searched that way (as pointed by the TODO comment inside the function). I'm doing two things here to optimise the search.
  • Packing the keys together at the top of the snapshot (Keys...
16:47
e6b8518 Optimize CClient::SnapFindItem (10x debug, 3x-4... - LordSk 56d3094 Save ctrl and shift press state - LordSk 0c4b3ab Sort snapshot items, binary search - LordSk 094336d Removed useless + 0 - LordSk 22abb62 Merge pull request #2129 from LordSk/task/opti1 - oy
Avatar
b37e0bc added missing description for str_utf8_skip_whi... - oy 2f564d5 added str_utf8_is_whitespace to for utf8 whites... - oy 3cb8367 removed duplicate code - oy
Avatar
implemented #2124, some visuals for the buffered chat features Should I post more screenshots?
Exported 10 message(s)