- Joined
- May 10, 2024
- Messages
- 57
Hi. I'm trying to understand why my ram usage and size of save file are increasing so quickly. I found a couple of threads about memory leaks and did a few tests based on that information.
I created an empty map with 100 units and 1 trigger which runs every 0.00 seconds. As soon as the map starts, I save the game and check memory usage. After 5 minutes I save the game again and compare the size of the save file and memory usage. When size of the file is bigger it always means that engine consumes more memory in game.
Test 1.
5:00 sec | 1_05.00.w3z | 644KB
The file size is same as before. Expected result. Continue.
Test 2.
5:00 sec | 2_05.00.w3z | 1669KB
The file size has increased. It is a leak. Expected result. Continue.
Test 3.
5:00 sec | 3_05.00.w3z | 739KB
The file size has increased but not as much as before. Unexpected result. Why does the file size keep increasing?
I created an empty map with 100 units and 1 trigger which runs every 0.00 seconds. As soon as the map starts, I save the game and check memory usage. After 5 minutes I save the game again and compare the size of the save file and memory usage. When size of the file is bigger it always means that engine consumes more memory in game.
Test 1.
-
Tick
-
Events
-
Time - Every 0.00 seconds of game time
-
-
Conditions
-
Actions
-
5:00 sec | 1_05.00.w3z | 644KB
The file size is same as before. Expected result. Continue.
Test 2.
-
Tick
-
Events
-
Time - Every 0.00 seconds of game time
-
-
Conditions
-
Actions
-
Set VariableSet group = (Units in (Playable map area))
-
-
5:00 sec | 2_05.00.w3z | 1669KB
The file size has increased. It is a leak. Expected result. Continue.
Test 3.
-
Tick
-
Events
-
Time - Every 0.00 seconds of game time
-
-
Conditions
-
Actions
-
Set VariableSet group = (Units in (Playable map area))
-
Custom script: call DestroyGroup(udg_group)
-
-
5:00 sec | 3_05.00.w3z | 739KB
The file size has increased but not as much as before. Unexpected result. Why does the file size keep increasing?