Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2021-11-04 00:00:00Z and 2021-11-05 00:00:00Z
Avatar
i have a suggestion to remake the rankpoint system. right now there are big differences between maps and the rankpoints they give. for example its probably very hard to get top10 on multeasymap but when you finish a harder map quickly you can get rankpoints evenw hen you didnt really speedrun the map. thats why i think its a good idea to use the % of ranks that were recently added. lets say you get rankpoints if youre within the top 3% of all ranks on that map. this would motivate more players to get a better average rank without having to push to top10. after all... you can be rank 11 on every map and have 0 rankpoints
f4 2
f3 2
Avatar
chillerdragon BOT 2021-11-04 08:49:55Z
yo @deen this is me begging you to not force push anymore to ddnet master :) i have like 2 active forks merging in irregular intervals and it would cause me big pain in the ass
Avatar
chillerdragon BOT 2021-11-04 09:07:40Z
yikes what do i do when client launch segfaults but running with gdb just hangs it? :C
Avatar
chillerdragon BOT 2021-11-04 09:54:37Z
fixed it with printf driven development :D
09:55
did anyone of you ever try to configure vscode with cmake? I am a bit annoyed by the greyed out code because vscode does not know about the cmake options i use
09:56
image.png
Avatar
Avatar
chillerdragon
did anyone of you ever try to configure vscode with cmake? I am a bit annoyed by the greyed out code because vscode does not know about the cmake options i use
you can configure it probs
10:17
the cmake command
10:17
what vscode probs does is generate compile_commands.json
10:17
but it depends on the flags u pass to cmake
10:18
for dev u should enable -DDEV and any other feature u want
10:19
10:19
maybe
10:20
Avatar
Avatar
chillerdragon
yo @deen this is me begging you to not force push anymore to ddnet master :) i have like 2 active forks merging in irregular intervals and it would cause me big pain in the ass
did I?
Avatar
chillerdragon BOT 2021-11-04 10:37:55Z
@deen: no worries mate you did not :) just asking you to keep it that way
10:38
@Ryozuki: yea tried that it affected the build but not the syntax hightlight
Avatar
u have to reconfigure
10:38
nobo
10:38
ctrl shift p
10:38
cmake: configure
Avatar
chillerdragon BOT 2021-11-04 10:38:58Z
oh ok lemme try
10:39
did it work for u?
Avatar
lol im not a normie
10:39
i use neovim
Avatar
chillerdragon BOT 2021-11-04 10:39:18Z
ok sir
Avatar
chillerdragon BOT 2021-11-04 11:04:29Z
omagwd it works how did it not work the first time
11:04
thanks ryo babe for motivating me to try again
11:05
image.png
11:05
but oof can we get some gitignore? :D
Avatar
echo ".cmake/" >> .git/info/exclude (edited)
11:06
ur a nobo
Avatar
chillerdragon BOT 2021-11-04 11:10:40Z
ik
11:10
but that diff
Avatar
eafc433 Ignore vscode cmake extension files - ChillerDragon 6f86647 Merge #4290 - bors[bot]
Avatar
chillerdragon BOT 2021-11-04 13:16:46Z
@Ryozuki: here u go mozilla dudes accepted it https://addons.mozilla.org/en-US/firefox/addon/github_forks/
Download GitHub Forks for Firefox. https://github.com/ChillerDragon/GitHubForks Find the best fork of a github repository quickly by browsing a rich representation of the network tab.
Avatar
Jupstar ✪ do you compile with llvm CFI?
13:17
LLVM CFI can be enabled with -Zsanitizer=cfi and requires LTO (i.e., -Clto).
13:17
i discovered this cuz rust added it https://github.com/rust-lang/rust/pull/89652 xd
13:17
Clang includes an implementation of a number of control flow integrity (CFI) schemes, which are designed to abort the program upon detecting certain forms of undefined behavior that can potentially allow attackers to subvert the program’s control flow. These schemes have been optimized for performance, allowing developers to enable them in release builds.
13:18
-fsanitize=cfi for clang
13:18
and requires lto
Avatar
01d097c Version 15.6 - def- 6fc198a Update language files for 15.6 release - def- 6e4221b Translate German - def- 74a499b Fix pickup network clipping - fokkonaut
13:19
01d097c Version 15.6 - def- 6fc198a Update language files for 15.6 release - def- 6e4221b Translate German - def- 74a499b Fix pickup network clipping - fokkonaut b4ea62a Use correct (larger) m_NumSwitchers bound - trml be65574 update catalan - edg-l 8252f46 Update spanish.txt (#4256) - n0Ketchp 4e698d3 Update spanish.txt - n0Ketchp 3dc733c Update spanish.txt - n0Ketchp d62ca7f Update spanish.txt - n0Ketchp 74d314d Update russian.txt - NikGreens 8ed1a93 Update russian.txt - NikGreens 8ea1655 Update russian.txt - NikGreens 642eaa4 Update brazilian_portuguese.txt - rffontenelle 47e2c4c Add exception id to TeamKill - Jupeyy 0000d75 Reset selection, if gui element was changed outside of DoEditBox - Jupeyy 160e02b Fix characters disappearing (fixes #4285) - fokkonaut
Avatar
new version poggers
13:19
poggers
Avatar
That is a massive release :D
Avatar
15.6: the memory safety update
13:26
monkalaugh
13:27
those changes are not in 15.6
Avatar
since they were not broken by 15.6 changes I think
13:28
ae6bb97 Fix characters disappearing (fixes #4285) - fokkonaut 29c376c Merge #4288 - bors[bot]
Avatar
If I keep adding new changes into 15.6 we need more and more rcs
13:28
5608338 Version 15.6 - def- 4aa696f Merge pull request #145 from ddnet/pr-15.6 - def-
Avatar
its good our problem are too many changes
13:28
and not the other way around
13:29
ddnet
13:30
@deen the sha sums are not updated yet?
13:30
maybe im too fast
13:30
xd
Avatar
true, running it now
Avatar
aur is updated
Avatar
great, thanks
Avatar
I'm around for an hour or so incase something blows up 😛
Avatar
5413041 sv_plasma_per_sec 0 => disable firing - def- 9cb30a8 Merge #4287 - bors[bot]
Avatar
chillerdragon BOT 2021-11-04 13:58:38Z
so nice version rls without conflicts in version.h :D without any conflicts at all
Avatar
Max on Discord reports: "After the update i got this weird grey bar on the right" !20211104145652_1 @Jupeyy any ideas?
15:10
Since 15.6, reported on Discord. !unknown out of memory in first line looks weird.
Avatar
``` Direct leak of 80 byte(s) in 1 object(s) allocated from: #0 0x559a82d44d19 in malloc (/media/ddnet/DDNet+0x9d6d19) #1 0x559a830326c1 in CCommandProcessorFragment_OpenGL2::Cmd_CreateBufferObject(CCommandBuffer::SCommand_CreateBufferObject const) /media/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1849:25 #2 0x559a830132bd in CCommandProcessorFragment_OpenGL::RunCommand(CCommandBuffer::SCommand const) /media/ddnet/src/engine/client/backend/opengl/backend_openg...
15:47
fixes #4291

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssan...
Avatar

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--u...
16:04
My game is crashing no matter which map I enter It happened after I just updated the game to new version Reported by anonymous on Discord
Avatar
rip rc
Avatar
I don't get how not a single one of us gets these weird issues
Avatar
well i dont play on windows
Avatar
Jupstar ✪ BOT 2021-11-04 16:05:42Z
yeah really weird
16:05
especially louis and others tested it
16:06
i also asked a few ppl from my clan to test it, who are all on windows
Avatar
we have way too few RC testers I'd say
16:20
a6f75b0 Mighty stepped down for now - murpii 82d6be7 Merge pull request #155 from murpii/patch-3 - def-
Avatar
chillerdragon BOT 2021-11-04 16:25:29Z
Yes RC are nice to stabilize releases. I try to merge client to master often its not rly RC but at least something :D
Avatar
Jupstar ✪ BOT 2021-11-04 16:29:45Z
or minimize ifdefs for windows and stuff, use the std or if the std isnt good enough some libs SDL also has some read write stuff, sadly not really powerful like e.g. c++17 filesystem (https://wiki.libsdl.org/SDL_RWFromFile "a UTF-8 string representing the filename to open")
The Simple Directmedia Layer Wiki
16:30
i could atleast imagine that most stuff used in system.h also exists in boost or std
Avatar
I dont want to imagine how much we'd break trying to replace system.h
Avatar
Jupstar ✪ BOT 2021-11-04 16:32:13Z
in the end boost and std have insanly stricter rules, so its probs easier to use than our randomly written system replacement functions xd
16:41
215747e 유빈 stepped down - murpii 0435f0b Merge pull request #156 from murpii/patch-4 - def-
Avatar
I pulled out all the laptops I have, none seem to be able to reproduce this :/
Avatar
Maybe if you switch your Windows language to Russian
17:21
or your username to Russian
17:21
at least Nakimar reported that reverting the unicode filesystem changes fixed part of the issue
Avatar
Oh, that's a lead
17:24
If only one developer could reproduce it we could find what's going wrong
Avatar
We should start logging the version and githash when starting the client
Avatar
definitely worse performance in 15.6
Avatar
Yes, the performance is obviously my greatest concern right now
Avatar
idk why you released it anyways xd
Avatar
Jupstar ✪ BOT 2021-11-04 17:47:57Z
how is the performance worse?
Avatar
Oh idk why, maybe since it worked for everyone in rc and it has been in testing for a long time now?
Avatar
Jupstar ✪ BOT 2021-11-04 17:48:03Z
i hope its not SDL again xD
Avatar
Avatar
Learath2
Oh idk why, maybe since it worked for everyone in rc and it has been in testing for a long time now?
But the performance loss was known
Avatar
You know we tend to write software to release not to let ferment
Avatar
Jupstar ✪ BOT 2021-11-04 17:48:29Z
@fokkonaut: can you be more explicit?
17:48
bcs of the doors?
Avatar
snapfinditem is slow on entityex
17:48
to match to the real entity
17:49
as learath suggested, we should have a new netmsg including them
Avatar
Jupstar ✪ BOT 2021-11-04 17:49:03Z
but that only matters for zooming out far doesnt it
Avatar
Yep, clipped to the view and zoomed at default you shouldn't be losing much performance at all
Avatar
Jupstar ✪ BOT 2021-11-04 17:49:41Z
i also benchmarked find item and most overhead comes from the insanly slow uuid manager lookup
Avatar
the whole client feels a bit worse than 15.5
Avatar
At zoom level 2 I lose about 5 fps from 15.5
Avatar
Jupstar ✪ BOT 2021-11-04 17:52:02Z
is there anything unique for every single netmsg?
17:52
that does not require uuid lookup for example
Avatar
oh, hm actually I do lose a lot more fps when checking on desktop
Avatar
not every entityex in a message each, but all in one
Avatar
I get 2k fps in 15.5 1k in 15.6 😛
Avatar
Jupstar ✪ BOT 2021-11-04 17:53:32Z
on what map tho?
Avatar
but there are no entityex on that map, I'm on grandma
Avatar
Jupstar ✪ BOT 2021-11-04 17:53:59Z
then its weird, are u on windows?
Avatar
I spec and look at the first part on both clients
17:54
on windows yep
Avatar
Jupstar ✪ BOT 2021-11-04 17:54:20Z
pls SDL
17:54
dont do this to me
17:54
can you replace SDL.dll @Learath2 ?
Avatar
yep, let me try
Avatar
Jupstar ✪ BOT 2021-11-04 17:54:41Z
to check if it comes from there
Avatar
ah won't work
17:55
SDL_FlashWindow is missing in old sdl
Avatar
Jupstar ✪ BOT 2021-11-04 17:56:13Z
ah true
17:57
https://github.com/Jupeyy/ddnet/commit/84e580b4d98d8c57b933f7bd1a7085bfaa19bdd9 completly randomly make UUID grouped in their 8Bit CRC already almost doubles the performance
17:57
so the best would be if we somehow could evade calls to it
Avatar
I just noticed heavy fps drops when you do /showothers and there are other players, is it due to the alpha?
Avatar
Jupstar ✪ BOT 2021-11-04 17:58:20Z
mhh, showothers generally drops alot of fps
Avatar
why? because /pause doesnt drop fps, while at the same position
17:58
i even get more fps in /pause
17:58
xd
Avatar
Jupstar ✪ BOT 2021-11-04 17:58:57Z
ah weird
Avatar
I can make a build with reverted SDL_FlashWindow. Would that help? Then we can test if SDL is causing lower fps
Avatar
Jupstar ✪ BOT 2021-11-04 18:01:29Z
i guess learath could just build himself?
Avatar
I can't on this computer
18:02
I rage uninstalled VS
Avatar
Jupstar ✪ BOT 2021-11-04 18:07:04Z
image.png
18:07
lookupuuid is so slow, with my trash crc thing it almost halves thats why i want to know if there is any unique ID that can identify a uuid packet early
18:08
or can it be sorted somehow to do binary search over the packets
Avatar
CAN REPRODUCE \o/
18:09
Just create a local user account with cyrillic name
Avatar
Jupstar ✪ BOT 2021-11-04 18:12:42Z
the Key() is that a 100% bet?
Avatar
@trml EntityEx for doors is sadly not helpful at all, since it still requires the tiles to be placed there ._. My plot doors that work with other tiles are not showing as closed with this :/
18:13
Even tho they are sent with entityex m_Number correct + SwitchState state closed
Avatar
Jupstar ✪ BOT 2021-11-04 18:14:46Z
@trml: you are not here by any chance?
Avatar
@trml I dont think it is smart to not send doors to clients when they are closed anyways, bcs thats such a small change in snapshot and somehow belongs to the server
Avatar
Do any of you have the capability to compile on windows?
Avatar
@Robyt3 @Learath2 Would like to release DDNet 15.6.1 with this

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memch...
Avatar
Avatar
Learath2
Do any of you have the capability to compile on windows?
yes
Avatar
Avatar
GitHub
Click to see attachment 🖼️
Um @deen this is nice and all but that build you gave out on #bugs didn't fix it for me, I'm not sure that's enough
Avatar
Avatar
fokkonaut
yes
If you have some time can you create a user account with a russian name and try to bisect the bug?
Avatar
ah, too bad
Avatar
wym user acc?
Avatar
windows username
Avatar
what would that change
18:22
ah nvm
18:22
i see
Avatar
It completely breaks the game for some reason
18:22
Reverting the most obvious commits didn't help
18:22
not sure what we broke there
Avatar
hm, i also had a unicode fs change
18:23
but it was only fs_rename so probably unrelated
Avatar
@Learath2 i can ask someone about the russian name, sec
18:25
this fixes the performance basically
Avatar
very cool, thanks for looking into the performance so quickly jupstar
Avatar
Jupstar ✪ BOT 2021-11-04 18:27:07Z
you can always ask deen or compile with the github CIs :D (@Learath2)
Do any of you have the capability to compile on windows?
18:27
Means, it would break extended messages
Avatar
Jupstar ✪ BOT 2021-11-04 18:27:59Z
why not ask robyte, he'll glady do it i bet
Avatar
Avatar
deen
very cool, thanks for looking into the performance so quickly jupstar
Dont apply that, lol
Avatar
Jupstar ✪ BOT 2021-11-04 18:28:16Z
he also tested ime stuff for teeworlds
Avatar
Avatar
Jupstar ✪
you can always ask deen or compile with the github CIs :D (@Learath2)
I doubt we can bisect remotely like this :D, with 500 commits it'd take 9 compilations
Avatar
so, 9 builds? 20 min turnaround time, we'd be done in 3 hours
Avatar
I'll just get mingw back on this windows installation
Avatar
Jupstar ✪ BOT 2021-11-04 18:30:37Z
ok
18:30
so its not possible anyway?
18:30
todo binary search
Avatar
Jupstar ✪ BOT 2021-11-04 18:31:20Z
@fokkonaut: can you please just say how your client does it?, do you use a different system for extensions?
Avatar
You mean F-Client?
18:31
It does the same as DDNet
Avatar
I think 0.7 is better at doing it's searches in snaps
Avatar
F-Client is a client mod for Teeworlds 0.7 developed by fokkonaut. - F-Client/uuid_manager.cpp at F-Client · fokkonaut/F-Client
18:32
my client uses heinrichs older approach, i htink
18:32
no idea if this is slower or not
Avatar
Jupstar ✪ BOT 2021-11-04 18:32:48Z
this sucks i know that
Avatar
We can go even further and unpack snaps into hashmaps so all further lookups are O(1)
Avatar
Jupstar ✪ BOT 2021-11-04 18:33:01Z
ok so you have the same performance regressions
18:33
maybe the uuid manager is just overkill
18:33
i dont see an easy way to binary search if you HAVE to use the UUID
Avatar
Avatar
Jupstar ✪
maybe the uuid manager is just overkill
no other vanilla compatible way i think, because it sends this snap as if it has the id 0
18:33
iirc
Avatar
Jupstar ✪ BOT 2021-11-04 18:33:58Z
yeah i already optimized it a bit, bcs nameplates were so slow in the past
18:34
hashmaps will be very slow i think
18:34
we need a 32bit lookup
18:34
everything else gets slow very fast
Avatar
Is that really the part that is getting overwhelmed?
Avatar
Jupstar ✪ BOT 2021-11-04 18:36:17Z
yes
18:36
Avatar
Avatar
Jupstar ✪
image.png
seems so
Avatar
Jupstar ✪ BOT 2021-11-04 18:36:34Z
oh sry
18:36
this
image.png
18:37
if there is a way to sort them somehow or not call uuid its fixable
18:37
else its a design flaw
Avatar
Sort what?
Avatar
Jupstar ✪ BOT 2021-11-04 18:37:39Z
sort keys to call the uuid loopup as less as possible
18:37
the uuid lookup is already binary, and still so slow, bcs its called so often
18:38
is heinrich online
Avatar
Jupstar ✪ BOT 2021-11-04 18:38:27Z
he could just tell xd
Avatar
Okay, iirc currently the snap includes an object that has the mappings from snap-type-id -> uuid
Avatar
Jupstar ✪ BOT 2021-11-04 18:39:26Z
wait netobject extensions have an unique identifier type dont they?
18:40
did we have some documentation somewhere?
18:41
Some Teeworlds stuff in Rust. Contribute to heinrich5991/libtw2 development by creating an account on GitHub.
Avatar
Avatar
fokkonaut
@trml EntityEx for doors is sadly not helpful at all, since it still requires the tiles to be placed there ._. My plot doors that work with other tiles are not showing as closed with this :/
wrong information as it seems, let me debug
Avatar
Basically NETOBJTYPE_EX objects provide a mapping from type-id inside the snap to a uuid
Avatar
Jupstar ✪ BOT 2021-11-04 18:42:09Z
ok
18:42
i mean we just need to "original key" and check against that i guess, snapfind item uses the lookedup item type
18:42
we need to original item type, is that always NETOBJTYPE_EX
Avatar
Extended objects get typeid > OFFSET_UUID_TYPE, NETOBJTYPE_EX objects provide the mapping from this typeid to the uuid
Avatar
Jupstar ✪ BOT 2021-11-04 18:45:13Z
ok
Avatar
https://github.com/teeworlds/teeworlds/pull/2129 here is what 0.7 did to optimize snap lookups
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 fram...
Avatar
Jupstar ✪ BOT 2021-11-04 18:48:53Z
yeah, but that doesnt like, like its doable
Avatar
Why not?
Avatar
Jupstar ✪ BOT 2021-11-04 18:49:47Z
ok another question you might know lets say you have 2 extended objects of the same type, do they share the same offset to the item uuid?
18:50
bcs type + id is not the same refering @fokkonaut
Avatar
they do
18:50
Well to be more correct they will have the exact same type within that one snap
Avatar
it is the same, but extended objects have type 0
18:51
to be vanilla compatible
18:51
"compatible"
18:51
i other words: so they can be sent to vanilla clients, so they can drop them
Avatar
Avatar
fokkonaut
it is the same, but extended objects have type 0
Um, nope. I don't think so
Avatar
yes, they have (edited)
Avatar
Eeeh, no they don't or snapshot.cpp is lying to me
Avatar
They are found by the uuid
Avatar
Type 0 is used to provide the mapping,
18:52
Types > OFFSET_UUID_TYPE are decoded using objects of type 0
Avatar
Jupstar ✪ BOT 2021-11-04 18:52:48Z
@Learath2: are the extended types dynamic, e.g. can it have a different internal index from snapshot to snapshot?
Avatar
Avatar
Jupstar ✪
@Learath2: are the extended types dynamic, e.g. can it have a different internal index from snapshot to snapshot?
Yes
Avatar
Jupstar ✪ BOT 2021-11-04 18:52:59Z
ok
18:53
so we only need to store these mappings?
Avatar
yea, but you dont send them as lets say 65557, it can differ from the type number thats on the server
Avatar
Jupstar ✪ BOT 2021-11-04 18:53:09Z
from snapshot to snapshot?
18:54
e.g. a map that has ENTITY_EX as key and the internal index as data entry of a std::map so we can just see what ENTITY_EX requires as internal type
18:54
and than do the thing in my commit with that mapped data
Avatar
Avatar
fokkonaut
yea, but you dont send them as lets say 65557, it can differ from the type number thats on the server
I'm not sure what you are really referring to, the first extended type in a snapshot will be type 32766
Avatar
Jupstar ✪ BOT 2021-11-04 18:57:25Z
yes
18:57
i'll just try it out and you have to judge on if it will work xd
Avatar
Avatar
Jupstar ✪
e.g. a map that has ENTITY_EX as key and the internal index as data entry of a std::map so we can just see what ENTITY_EX requires as internal type
I'm not sure what part of the process is the bottleneck. Is it the fact that we are looking for objects of type ENTITY_EX and that has to go through uuid which is too slow?
Avatar
Jupstar ✪ BOT 2021-11-04 18:59:37Z
i mean linear search is slow, but most bottleneck simply comes from the fact we do uuid lookup and uuid is 16bytes
Avatar
but what call stack leads to the lookup?
19:00
Is the new void CGameClient::SnapCollectEntities() taking too long?
Avatar
Jupstar ✪ BOT 2021-11-04 19:00:28Z
i assume all calls, bcs it always hits extended objects
19:00
and they are "unwrapped"
19:01
that function too yes
19:01
its 50% of the calls, the rest is onnewsnapshot
19:01
ok no
19:01
its -5% of all perf
19:01
and onnewsnapshot does 50% of all
Avatar
I don't follow, I'll just get a profile of my own
Avatar
Jupstar ✪ BOT 2021-11-04 19:02:25Z
image.png
19:03
oh thats the optimized version
19:03
image.png
Avatar
Hm, I don't know what SnapFindItem call is causing this
Avatar
probably from entityex
Avatar
There is no SnapFindItem for entityex tho, they are collected differently
Avatar
Jupstar ✪ BOT 2021-11-04 19:08:11Z
it also doesnt really matter which one it is, i think all netobjects use it
19:08
the problem is that entity ex are part of the snapshot
19:08
so they are still looked up
19:08
(?)
Avatar
There are rather few calls to snapfinditem in the code :/
Avatar
Avatar
Jupstar ✪
so they are still looked up
yes, what i thought too
19:09
right now xd
Avatar
Maybe the new entityex just make the snap too big for linear search to be viable?
Avatar
Jupstar ✪ BOT 2021-11-04 19:09:44Z
so @Learath2 you are saying that we can just ignore objectex?
19:09
in that call
19:09
that would be even easier
Avatar
i think so, yes
Avatar
Avatar
Jupstar ✪
so @Learath2 you are saying that we can just ignore objectex?
Wym? The id 0? that already should be early returning from GetItemType
Avatar
Jupstar ✪ BOT 2021-11-04 19:11:08Z
so just check if the item type is over UUID_OFFSET, and only check else
19:11
it doesnt rearly return if there is a object_ex somewhere in the snapshot
19:11
early*
19:11
bcs that object_ex is looked up, even if it doesnt matter for this find call
19:12
it makes no difference between the type of the snapshot thing
Avatar
What do you mean by object_ex? NETOBJTYPE_EX?
Avatar
Jupstar ✪ BOT 2021-11-04 19:12:27Z
yes
Avatar
NETOBJTYPE_EX == 0 which is < OFFSET_UUID_TYPE so GetItemType should never result in a uuid lookup
19:13
Idk what else you'd be meaning by lookup
Avatar
Jupstar ✪ BOT 2021-11-04 19:15:04Z
ok
19:15
then not objtype_ex
19:15
but whatever uses the uuid thing
Avatar
Can we somehow learn where this snapfinditem is being called from?
Avatar
Jupstar ✪ BOT 2021-11-04 19:15:37Z
NETMSG_MAP_DETAILS
Avatar
You can try caching the mapping OnNewSnapshot actually
Avatar
Jupstar ✪ BOT 2021-11-04 19:16:31Z
if snapfinditem doesnt require extended protocol, it will be fast enough
Avatar
Get all the NETOBJTYPE_EX objects, build a map from internal id directly to externalid, then use that for this snapshot
19:17
NETMSG_MAP_DETAILS isn't even a snap object, how would it be going thru snapfinditem?
Avatar
Jupstar ✪ BOT 2021-11-04 19:19:06Z
well i dunno what message
19:19
but one of them must be in
19:19
or the server sends buggy snapshots
19:19
safe or not?
Avatar
I don't see how that's helpful
19:22
You removed the ability to find extended objects?
Avatar
Jupstar ✪ BOT 2021-11-04 19:22:59Z
NETOBJTYPE_GAMEINFOEX
19:23
thats the question (@Learath2)
You removed the ability to find extended objects?
19:23
is it ever useful? the client only 2 times does not try to find a non vanilla object type
Avatar
I'm not following your logic here. You are still doing GetItemType, which is already cheap for non extended object
19:25
s
Avatar
Jupstar ✪ BOT 2021-11-04 19:25:19Z
ok NETOBJTYPE_DDNETPROJECTILE seems like a problem atleast?
19:25
thats what i suggested yes (@Learath2)
Get all the NETOBJTYPE_EX objects, build a map from internal id directly to externalid, then use that for this snapshot
Avatar
Avatar
Jupstar ✪
ok NETOBJTYPE_DDNETPROJECTILE seems like a problem atleast?
I actually don't have any idea, you managed to completely confuse me 😄
Avatar
Jupstar ✪ BOT 2021-11-04 19:26:04Z
ok lets see it like this:
19:26
NETOBJTYPE_GAMEINFOEX is in the snapshot every time isnt it?
19:26
every tick
Avatar
Jupstar ✪ BOT 2021-11-04 19:27:02Z
and NETOBJTYPE_GAMEINFOEX is uuid so even if you search for something completly unrelated, like a character, it might still lookup this ID type
Avatar
Ah, I see what you mean, as said I think building a map at the start will work
Avatar
Jupstar ✪ BOT 2021-11-04 19:27:55Z
ok
Avatar
Your patch makes more sense too now, it's not correct but it does make sense
19:29
Check if the type we are looking for is an extended type. If not don't even do the lookup is what you are trying to do, right?
Avatar
Jupstar ✪ BOT 2021-11-04 19:32:11Z
from what i see only NETOBJTYPE_DDNETPROJECTILE is used in snapfinditem
19:32
so we basically only would require mapping for this single uuid
19:33
(the only non vanilla netobj to be precise)
from what i see only NETOBJTYPE_DDNETPROJECTILE is used in snapfinditem
Avatar
Branch on Type < OFFSET_UUID_TYPE if true check the raw type, else check thru getItemType. it's not pretty but it will show if that's the issue
Avatar
Jupstar ✪ BOT 2021-11-04 19:38:04Z
but i guess i can also check against OFFSET_GAME_UUID-1 from protocol.h so i know if the type expects a uuid or not the uuid manager always adds + OFFSET_UUID
Avatar
Oh please don't confuse me more, these are all different uuids
19:39
offsets*
19:40
OFFSET_UUID_TYPE is the offset you are looking for, types < that are internal vanilla types, types >= are extended types period
19:45
that fix atleast doubles my fps
Avatar
Use the wide char variants of getenv and _mkdir. Tested the change on upstream with japanese characters and german umlauts in username. This should fix the issues with cyrillic, I don't know if that "out of memory" was also caused by that (#4293).

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c esp...
19:52
…ype anyway Most performance loss currently comes from the simple fact that lookupuuid is slow. This addresses the problem by making sure its only called for net messages, that are extended anyway @trml or @heinrich5991 can you check if that makes sense without breaking something?

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it...
Avatar
this better be all the unicode fixes justatest
Avatar
Avatar
fokkonaut
@trml EntityEx for doors is sadly not helpful at all, since it still requires the tiles to be placed there ._. My plot doors that work with other tiles are not showing as closed with this :/
oh. do normal doors show correctly for you? doors are only rendered from the snapshot, so the client doesn't know if it's actually a "real" door or anything else. perhaps you can compare the values (and m_Number/m_Layer) with normal doors
Avatar
All fine, I was only sending m_NumSwitchers amount for SwitchState, forgot to add + m_NumPlots from my side
21:09
All working
Avatar
ah ok, nice
Avatar
If door prediction will base on this, and not tiles, it will work so good :)
Avatar
yes, the idea is to make it possible to get more general prediction (and in theory you could even add other types of doors, and get prediction)
Avatar
if someone ever fixes the "pass through doors" thing for example:P (edited)
21:13
(or maybe it already is)
Avatar
its not
21:14
I dont think its needed to fix that for prediction tho
Avatar
Avatar
Jupstar ✪
from what i see only NETOBJTYPE_DDNETPROJECTILE is used in snapfinditem
I have a branch where I got rid of even more calls to SnapFindItem, including this one (I think), by caching the SNAP_CUR->SNAP_PREV mapping in addition to the entity ex mapping, so I could try to finish up that one
21:28
I dont know much about how UUIDs/SnapFindItem works otherwise, but noticed previously that the uuid lookup took most of the time there
Avatar
Avatar
Robyt3
this better be all the unicode fixes justatest
oh, you're here too. hi, thanks for fix 🙂
Avatar
3df3feb fix fs_makedir and fs_storage_path with unicode on windows - Robyt3 83d8e2b fix fs_getcwd with unicode on windows - Robyt3 3854814 fix fs_chdir with unicode on windows - Robyt3 1c809fa Merge #4299 - bors[bot]
Avatar
@trml || anyone looking into the uuid thing: The mapping of type to uuid is not static, it's per snap. Just be careful with that
Avatar
oh, so its a mapping to the types, not the objects? then I probably misread a few things of the discussion above
Avatar
Okay, let's use concrete terminology here. When I say type I refer to the type part of the "typeandid" construct inside any given netobject
22:11
That type if below OFFSET_UUID_TYPE refers to vanilla object types. Except for type 0 (NETMSGTYPE_EX). Objects of type 0 instead denote a mapping from their id (which refers to the id inside the netobject) to a uuid.
22:12
Types above OFFSET_UUID_TYPE are mapped to uuids using the mappings sent in the NETMSGTYPE_EX objects. Then these uuids are mapped to types using the uuid manager
22:13
That last sentence should have been s/types/concrete types/ as in NETOBJTYPE_ENTITYEX e.g.
Avatar
01d097c Version 15.6 - def- 6fc198a Update language files for 15.6 release - def- 6e4221b Translate German - def- 74a499b Fix pickup network clipping - fokkonaut b4ea62a Use correct (larger) m_NumSwitchers bound - trml be65574 update catalan - edg-l 8252f46 Update spanish.txt (#4256) - n0Ketchp 4e698d3 Update spanish.txt - n0Ketchp 3dc733c Update spanish.txt - n0Ketchp d62ca7f Update spanish.txt - n0Ketchp 74d314d Update russian.txt - NikGreens 8ed1a93 Update russian.txt - NikGreens 8ea1655 Update russian.txt - NikGreens 642eaa4 Update brazilian_portuguese.txt - rffontenelle 47e2c4c Add exception id to TeamKill - Jupeyy 0000d75 Reset selection, if gui element was changed outside of DoEditBox - Jupeyy 160e02b Fix characters disappearing (fixes #4285) - fokkonaut dc95187 fix fs_makedir and fs_storage_path with unicode on windows - Robyt3 4bdcbef fix fs_getcwd with unicode on windows - Robyt3 10ec409 fix fs_chdir with unicode on windows - Robyt3 d65a8e8 Don't call uuid lookup, if the expected type isn't an uuid extended type anyway - Jupeyy c396711 Version 15.6.1 - def-
Avatar
Optimizations that come to mind are first keeping this a mapping from extended concrete types to snap internal types
22:15
Second optimizing the linear lookup in SnapFindItem
22:16
Third re-engineering the extended net objects to negotiate the mapping before the first snap through netmsgs
Avatar
yes, thanks, that clarified it quite a bit (wasn't aware of how uuids worked internally)
22:19
something I thought about previously (and tried a bit) was to do something like SnapCollectEntities to also gather the snap_prev and snap_cur versions of netobjects in the same list, to reduce the calls to SnapFindItem more, but not sure if that would be needed with those other optimizations?
Avatar
I actually have no idea what is the problem here, I haven't profiled it myself so I'll refrain from saying anything concrete
22:20
I think the optimization jupeyy came up with + taking the binary search for snaps from 0.7 should get us back to the same performance, but not exactly sure
22:21
I'd also like to get @heinrich5991 to take a look at the optimization we thought of, I'm sure he'd have a more elegant way of doing it since my idea breaks abstraction
22:23
Oh and an extreme optimization I don't remember who came up with is to unpack the snaps as they arrive into a hashmap
22:23
This would make all lookups O(1), though I think most of the operations on a snap seems to be iterating which is not that good in a hashmap
Avatar
yes, lookups on ID are perhaps mostly useful for things like matching cur+prev
Avatar
SIMD snap parsing when?
Exported 408 message(s)