Pathoschild / SMAPI

The modding API for Stardew Valley.
https://smapi.io/
GNU Lesser General Public License v3.0
1.81k stars 259 forks source link

Poor Frame Rate (From Forum) #12

Closed ClxS closed 8 years ago

ClxS commented 8 years ago

http://community.playstarbound.com/threads/stardew-modding-api-0-37.108375/page-2#post-2806665

I read through all the comments here, and no one else seems to have my problem, so I made an account to post about it. The frame-rate on my farm is game-breakingly slow whenever I run the API (version 0.37.1). I have some cosmetic mods installed (re-textures for my cat & horse and a couple portraits) and everything works fine when I run the Stardew Valley.exe that came with the game. As soon as I try to run the StardewModdedAPI.exe, though, I can't do anything on my farm. Everywhere else is fine (in the farmhouse, farm cave, around town, literally everywhere except the farm...). Is there something in the API that would cause this? I haven't fully cleared the farm yet, so there's still trees, rocks, and grass everywhere... Is that causing the problem? I'm running the Steam version on Windows 8.1 as an administrator with scaling DPI if that helps. (The game won't open on my computer without scaling DPI)

EDIT: Actually I haven't checked the caves will get back to you with that. EDIT:EDIT: Caves are fine.

Jtfinlay commented 8 years ago

Ran some perf testing. The heaviest hitter is definitely UpdateEventCalls(); in SGame.cs . It takes nearly 40% of the application's total CPU usage.

I'll investigate and see if I can clean it up.

Jtfinlay commented 8 years ago

Found the issue, we're getting a huge hit from the Extensions::GetHash method. Will fix and have a pr out.

ClxS commented 8 years ago

Closed until reported again, looks like the probable fix!

speeder commented 8 years ago

ClxS The fix worked, but you forgot to make a quick bugfix release of it, players are still using the slow version.

ClxS commented 8 years ago

Woops, thanks for pointing that out. Just released and posted it.