Massive Lag in Build Works Fine in Editor

Hello,

My project works perfectly well in editor 5.11 in stable ~~90FPS, but if I build my game to Windows Standalone it suddenly massively lags. 10 seconds between my input and any response from the game. Completly unplayable. The game is simple singleplayer shooter game, barely started.

I tried to build several times, always the same.
I googled and can’t find anyone with the same problem.

Anyone has encountered this problem before or has any idea what’s wrong?

Edit: Restarting my pc resolved this problem (at least temporary), but still I don’t think that this is proper behavior…

Sounds to me that you have some memory (ram) problem. If you restart the PC, it also clears up the RAM therefore you will gain some access to the memory (ram) that’s the reason it is fixed for you.

The cause for this, is probably too much hard references are present at the specific time. I need you to confirm this with you first before I suggest some solution.

I’m not sure but I don’t think so.
I have 32 GB RAM. If it was RAM issue it would also lag inside editor or some others games would also lag. I just built my game, it’s not laggin this time but I still have more than 10GB available. It’s hard for me to imagine I would use all 32GB RAM.
Unless it was some kind of one-time event? Like having infinite loop that ate all ram and did not free that memory?

Not sure how I’m supposed to check if I have too much hard references.

Edit: It’s lagging again.

I have Nvidia Geforce RTX 3070

This is something that I’m afraid you need to check it yourself. There are two types of optimization, CPU and GPU. GPU is related to rendering stuff while CPU includes both rendering and technical tasks. This means, if it’s related to hard references, it might have to do with CPU saving data into the RAM. It’s not particularly bad cause your OS will handle most of it. But again, I’m just guessing here, I have no idea what exactly it is. You will have to do the debugging/optimization yourself.

It’s easier to debug GPU than CPU. You will need to identify which one uses the most m/s. It can be ticks, it can be materials, it can be instances, it can be anything. To know what exactly it is, you will have to debug it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.