Simulator Performance Issues

Hey !

So I'm on Linux, and I'm having sizeable performance issues with the Simulator. It seems to be running at ~10fps in all games, even in the Launcher. I know it's not my computer, because it used to work fine. I'm not sure exactly when it became so laggy, but it's not suitable for game development.

I tried rebooting my PC, and deleting ~/.config/Playdate Simulator/, none of which worked. I don't really know what else I could try, to be honest. Is this an issue someone has had before ? Is it maybe a feature I accidentally turned on or something.

Here's an example video in Celeste by hteumeuleu : https://imgur.com/a/OIYcSZW.

Thanks for your time ! :slight_smile:

Have you done any profiling on the Simulator to see if it's using a lot of CPU when this happens? If not, could you profile it or see if another process is bogging down your computer? If you've deleted your settings it should have reset anything that would have slowed down the Simulator. I can't think of anything that would be causing this behavior off the top of my head.

1 Like

Yes ! I did. I forgot to mention perhaps the most important piece of information :sweat_smile: : nearly 100% of the processing is done by what I assume is native C code (see picture below)

I have no idea what this could mean.

Edit: As for the simulator, it is using around 10% of my CPU which sounds fine to me, and no other notable program is running.

Could you post the game you're testing with or DM it to me to see if I can reproduce this at all, thanks.

The specific game I was using for demonstration is Celeste Classic, but the problem happens with any game I can throw at it, and even without launching any game just in the playdate menu and settings. Even in a game where the pd.update() function is completely empty, it still happens...

Edit: And the samples that the (C) function is making seem to happen 10 times per frame.

Did you try reinstalling the entire SDK? Perhaps one of the lua files in the SDK was edited?

I just did, no difference...

Could you try an older SDK and see if they also reproduce this issue? Linux SDKs

1 Like

Well, that worked. So apparently this is only an issue in 2.2.0 and up for me. That's why it worked before. Thanks ! :smiley: I guess I'll just use the 2.1.1 for now.

Edit: Should I change this to 'Bug report' then ? Also the near 100% consumption by (C) is normal apparently

Man, now to try and figure out what is in 2.2 that might cause this, just for you. :slight_smile: What distro are you using?

Arch ! Yeah I don't know. This hasn't happened to anyone before ?

This is the first I've heard of anything like this.

1 Like

Can you tell me the version of arch you're using?

This is a problem for me both on kernels 6.7.6-arch1-1 and 6.6.18-1-lts.

Could I send you a build of the Sim with a bit of code disabled to see if that helps at all?

1 Like

Sure ! Send me a dm !

Bad news, the code that I thought might be slowing it down isn't called in normal use. Could you run the Sim using perf and see if it sheds any light on the slow down? Oh, also are you running in a VM or bare metal?

Sure, here is the perf.data I got from perf record ./PlaydateSimulator Celeste.pdx : https://file.io/kbaCiKeCqyra. And I am running it on bare metal.

Edit : It seems like there are a lot more mallocs happening than with the working Simulator. Here is that file for reference : https://file.io/PbAgu5qhDC2p

The first file is deleted, could you repost? Thanks! Edit: Could you repost both?

Sorry :sweat_smile: here are Mega links :