YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
15 stars 7 forks source link

Performance: [Mac IDE] Stutters & increases RAM usage over extended sessions of editing projects #4424

Open NanoSharkGames opened 6 months ago

NanoSharkGames commented 6 months ago

Description

After editing code & compiling a project on the Mac IDE of GameMaker for about a couple hours, the IDE stutters & RAM usage increased from half a GB to more than 3 GB. This was tested on IDE version 2023.11.1.

Steps To Reproduce

  1. Open GameMaker
  2. Load project whose folder is about ~16MB according to Finder / Get Info.
  3. Edit code & compile project for a couple hours without closing.
  4. Notice stutters in editing code & RAM usage ramping up significantly, according to Activity Monitor.

244c3515-f6a6-405e-84d8-9742faabcfd2

Retrific commented 6 months ago

Maybe related: https://github.com/YoYoGames/GameMaker-Bugs/issues/2528

NanoSharkGames commented 3 months ago

I am using version 2024.2 and the issue is apparent after using it for a couple of hours. The color wheel icon on Mac shows up more often & slows down my workflow.

Screenshot 2024-04-09 at 3 18 25 PM
stuckie commented 3 months ago

Oh.. thats an interesting amount of ports open.. I wonder if that is pointing towards a thread leak.

Will have a look into this a bit more in the morning, thanks!

NanoSharkGames commented 3 months ago

Any updates on the investigation into the ports issue?

stuckie commented 3 months ago

Much like the related issue above, this is proving to be a menace to pin down. From a quick look that I had the other week, nothing immediately stood out; so again it'll likely be some sort of interaction between systems where artificially poking about isn't going to cut it.

As the April release is getting closer to the end, there should be a bit of time to sit down and use the IDE with some purpose - going through some tutorials, for instance - with all the profiling tools hooked up. That's the plan anyway, and hopefully that highlights something.

I'm honestly looking forward to the probable dumb fix that this is going to be at the end, after it's eluded us for so long.

NanoSharkGames commented 3 months ago

Maybe related to this issue: I do notice that my MacBook's battery drains significantly when using the IDE compared to other software, especially for an extended period of time. Do you suspect that the reason is because of this issue? Also, are there any optimizations planned for making the IDE more lightweight?

Thanks so much for the helpful responses, & I hope you have a good rest of your week.

NanoSharkGames commented 2 months ago

I just updated to 2024.4 & the issue has not improved for me.

I took two Activity Monitor screenshots, one CPU & one memory usage, which was around the same minute. I used the IDE for only 30 minutes before I took these screenshots.

GM CPU Usage 2024-05-02 4 25 34 PM GM Mem Usage 2024-05-02 4 25 50 PM

NanoSharkGames commented 2 months ago

I downloaded & tested the 2024.4.1 hotfix, which reduces this issue. The memory usage still increases over time, but not as rapidly.

thennothinghappened commented 2 months ago

I'm just popping in here on Russell's advice to do so - I feel like one of the big leaks could be related to saving. I have a strong habit of saving over and over on the order of seconds while I type - a bad habit I've picked up from how often my power goes out. Over about an hour's time it feels on MacOS (I also do this on Windows without issue) that it gradually gets slower and stutterier. Checking Activity Monitory I then see the IDE has climbed gigabytes in usage.

This observation may be a red herring for this, but did also briefly check the memory usage while the IDE saved, and each time it did it it seemed to be trending upward.

NanoSharkGames commented 1 month ago

After more testing with the 2024.4.1 Mac IDE on my MacBook Pro, there are still memory leaks & increased resource usage over time. This issue, in addition to the ProMotion IDE frame rate bug I filed (#5722), makes the IDE slower over time & causes more battery drain & heat.

Emc1923 commented 1 month ago

Performance issues still present in 2024.6 Betas, tested as of IDE v2024.600.0.572 Beta Runtime v2024.600.0.597.

stuckie commented 1 month ago

For those wondering, we found some thread logic that was misbehaving.. it worked better on the machines I tested, but, like most of these issues have been, it seems like it's not worked for every configuration. It will be in the next beta, so hopefully it helps some others.

NanoSharkGames commented 1 month ago

While performance & RAM usage over time has improved with the latest betas, RAM still ramps up slightly over time.

NanoSharkGames commented 6 hours ago

Might be unrelated to this specific issue, but wanted to point out the following anyway: I am observing a significant improvement in performance & battery life on my M2 MacBook Pro while using the IDE & testing projects. Currently using 2024.6.2.