-
Posts
3.445 -
Joined
-
Last visited
-
Days Won
76
wraitii's Achievements
-
Re-Release A27 or RC builds?
wraitii replied to Seleucids's topic in Game Development & Technical Discussion
https://en.wikipedia.org/wiki/Garbage_collection_(computer_science) It's linked to our usage of javascript. As it happens, I also have a diff for this problem: https://gitea.wildfiregames.com/0ad/0ad/pulls/7239 -
Re-Release A27 or RC builds?
wraitii replied to Seleucids's topic in Game Development & Technical Discussion
Replaying this - I don't see an obvious point where lag shows up, it's just slowly slower over time. There are big lag-spikes from the full hashes - they take about 150ms on my machine and I have a very powerful computer. The biggest lag spikes are GC slices, which take around 350ms on my machine. Regular sim turns take about 30ms, so on slower computers that's a lot of lag. --- I suspect the phase 3 lag might actually be from the GUI update, which I won't see by just replaying. -
Re-Release A27 or RC builds?
wraitii replied to Seleucids's topic in Game Development & Technical Discussion
Could you upload a commands.txt of a game which shows this behaviour? It's possible that there's some tech thing that leads to issues. -
Re-Release A27 or RC builds?
wraitii replied to Seleucids's topic in Game Development & Technical Discussion
I suspect the report is showing data at the end of the game when things are smoother. You should try clicking "save live report to file" in the middle of the game. But based on that profiling, your render frames take exactly 16ms which is consistent with targeted 60 fps. The "sim" frame every 200 ms take about 50ms, which should be potentially noticeable, but not dramatic. Breaking that down ,the "gui sim update" takes about 10ms, and the sim update is probably variable but 5-15ms is expected. The full state hash check in that replay is 111ms which is definitely noticeable. --- One possibility is that the lag is GUI lag. We've bumped the max selection size to 300 units I believe, that might affect lag? -
Re-Release A27 or RC builds?
wraitii replied to Seleucids's topic in Game Development & Technical Discussion
This video seems to show "regular sim lag" to me - I would expect A26 to behave similarly. If you upload the profile2 JSON file we could look more in-depth. -
Re-Release A27 or RC builds?
wraitii replied to Seleucids's topic in Game Development & Technical Discussion
The hashing happens on the main thread so the CPU literally cannot do anything else. So it's a freeze of everything. -
Re-Release A27 or RC builds?
wraitii replied to Seleucids's topic in Game Development & Technical Discussion
Yeah as Stan said the "lag" is not actually lag, it's the simulation update (or the turn hash) taking too long. This should also show in replays from commands.txt. -
Re-Release A27 or RC builds?
wraitii replied to Seleucids's topic in Game Development & Technical Discussion
See, the thing is that this is inconsistent with what should happen, so I find it a little sus. My patch should basically remove the every-4s-freeze entirely, but this should happen mostly right from the start and just get slowly worse over the game. If it slows down during fights it's something else and the patch should not be changing that. With regards to running with the patch - it's safe, but you will OOS right from the start and you then might miss out on actual OOS, or cheaters and such. So that's not ideal. We have been looking into it and there's really no way to make it compatible with A27 as released, unfortunately. So we need a patch release, and it's going to be incompatible, and that's all very annoying. But we're not a big team and we don't have a lot of free time - and we do this on our free time - so you'll have to take things in your own hand in the very short term. We'd like some help, actually. When you play MP games, please upload your commands.txt so we can replay and profile your games. Please upload your profile.txt so we can get some idea of what's slow. Please profile using profiler2. Please profile using perf or samply or something else. Please bisect. It's not that complicated, and if you need some help, at this point I think deepseek or chatgpt or mistral or llama or gemini or grok can help you out. And don't try to pull rank by talking old school. I've been around longer than the lobby has. -
@guerringuerrinThis is usually a browser error because the profiler loading uses too much recursion. Firefox seems to be the browser with the highest default limit right now.
-
From what I can tell, there's a few things: Vulkan rendering makes the game have much higher FPS on average, so the simulation ticks, which happen every 200ms, are much more noticeable. This is especially true on e.g. Combat-Demo-Huge. Full state hash checks happen every 20 simulation turns (so every 4 seconds) and are quite slow. I'm not sure it's a new problem - could be exacerbated by happening every 4 seconds since this commit, but I'm pretty sure that was in A26 as well. I haven't noticed anything obvious when profiling a few things. It's possible it's also the smoother rendering making it more obvious ? Shrinking GCs happen every 500 simulation turns, so about every minute and a half. These can cause a lag spike. Pathfinder can still lead to some very slow simulation ticks on occasion. The sim itself might have some rare cases where some turns take extra-long, like when a player is defeated. The GUI is also occasionally slow, notably when selecting a lot of units.
-
@real_tabasco_sauceCan you post the commands.txt of the 4v4 you posted on the ticket ?
-
Making things block vision could be a significant slowdown and would at a minimum require a large rethinking of the LOS algorithm. Walls blocking projectiles is more doable, but hasn't really been a priority or a target.
-
Can you say which map and which settings?
-
(future) ESR115 & better JS profiling
wraitii replied to wraitii's topic in Game Development & Technical Discussion
Still needs a little work now that we're on 115, but it works: https://gitea.wildfiregames.com/0ad/0ad/pulls/7399 -
Personally would be fine with IRC, Matrix has been a little annoying every time I've used it - the web clients seems slow-ish, and I haven't taken the time to find a client I liked. I'm also only somewhat semi-active, and for work am now mostly on telegram (+ slack) so not really relevant. If Zulip is more lightweight than Matrix it would have my preference, but I think we aren't big enough that IRC is unworkable.