You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Repeated resizing of the kOS terminal appears to cause a memory leak while the resized terminal stays loaded. The terminal also doesn't need to be open for the leak to occur. The leak is also something interacting with the mono heap at least according to the basic performance information available in the alt+f12 menu. Lastly while I only tested going back to the tracking station the scene change did cause the memory to be released. Lastly the rate of the leak appears to be related to the amount of "area" change to the terminal as changing between an width of 200 and 201 showed more or less the same leak rate as changing between a width of 50 and 51, where as changing between a width of 25 and 50 would be faster, the height was held constant for my testing.
This was the code I used for testing
LOCAL width1 TO 50.
LOCAL width2 TO 200.
LOCAL oldTime TO KUNIVERSE:REALTIME.
LOCAL newTime TO oldTime.
UNTIL (newTime - oldTime) > 1 {
SET TERMINAL:WIDTH TO CHOOSE width1 IF TERMINAL:WIDTH = width2 ELSE width2.
SET oldTime TO newTime.
SET newTime TO KUNIVERSE:REALTIME.
}
as at least on my system the leak was associated with significant lag so terminating the loop once the real time taken for a given pass grew to large meant I didn't need to restart KSP between each run.
This issue was originally posted on the kOS discord and it is being transferred so it isn't forgotten.
The text was updated successfully, but these errors were encountered:
Repeated resizing of the kOS terminal appears to cause a memory leak while the resized terminal stays loaded. The terminal also doesn't need to be open for the leak to occur. The leak is also something interacting with the mono heap at least according to the basic performance information available in the alt+f12 menu. Lastly while I only tested going back to the tracking station the scene change did cause the memory to be released. Lastly the rate of the leak appears to be related to the amount of "area" change to the terminal as changing between an width of 200 and 201 showed more or less the same leak rate as changing between a width of 50 and 51, where as changing between a width of 25 and 50 would be faster, the height was held constant for my testing.
This was the code I used for testing
as at least on my system the leak was associated with significant lag so terminating the loop once the real time taken for a given pass grew to large meant I didn't need to restart KSP between each run.
This issue was originally posted on the kOS discord and it is being transferred so it isn't forgotten.
The text was updated successfully, but these errors were encountered: