ata4 / angrylion-rdp-plus

A low-level N64 video emulation plugin, based on the pixel-perfect angrylion RDP plugin with some improvements.
157 stars 25 forks source link

Serious performance issues on latest builds #37

Closed ghost closed 6 years ago

ghost commented 6 years ago

I don't know what have happened to the plugin but now I got serious performance issues with practically all games I have in my collection.

I have been using r5-6-dirty for a good while now and performance have been great!

On r6-56 the performance is very very bad and I rarely get full speed anymore.

There have been quite a lot commits between r5-6-dirty (https://github.com/ata4/angrylion-rdp-plus/commit/13c4b894130806ac64a094802c8cb9d4d1a7e74e) and r6-56 (https://github.com/ata4/angrylion-rdp-plus/commit/eef64660d59054daf10504ba5c3af612ee5a2cdd) and the size of the plugin have shrunk from around 607kb to 492kb

To put it simple, games are running slow as if you were using vanilla angrylion.

ata4 commented 6 years ago

The recent changes contain some bigger changes to manage thread-local storage myself, since some compilers are known for their extremely inefficient implementations in certain situations. The rest is some restructuring to merge some code pieces and simplify the connection between the internal and the plugin interfaces.

While it does hurt Windows performance a bit, it definitely shouldn't degrade it to single-threaded performance. Are you sure you have selected multi-threaded rendering in the options? If so, maybe adjust the number of workers a bit. On both my and theboy181's system, the most recent commit still seems to run pretty fast.

ghost commented 6 years ago

Thanks for your input!

I have to look at this deeper tomorrow morning, usually when I try a new build out the only thing I change is the Video Output Filtered/Unfiltered, the rest just works out of the box.

I have never touched any of the multi-threaded rendering options in the past so I don't know what numbers I need to put in, it's currently set to 0.

ata4 commented 6 years ago

0 means it uses all available processors, both physical and virtual. You could try lower numbers, for example. Maybe just the number of physical cores.

theboy181 commented 6 years ago

@SigmaVirus This plugin is running great for me! There are a couple of things I would check for, make sure that you don't have CPU set to interpreter, and make sure sync to audio is not used.

I would say that the performance is better than way better than r4-56, and at par of r5-1 dirty

theboy181 commented 6 years ago

r6-56 image Filtered image Unfiltered

r5-1-dirty (last build I had) image Filtered image unfiltered

I noticed that the FPS was a little more spastic on the latest build, so it was harder to capture the speed int he screen captures. After the r5-1 build there was a slight regression in Windows speed after the Linux improvements. @barracuda is aware of the regression.

ghost commented 6 years ago

Thanks for your replies guys but I have found out what the problem was.

The problem was that the Multi-threaded checkbox wasn't ticked by default in the new build but was ticked by default in older builds.

One tick later and it's fullspeed again in r6-56!

So there is nothing wrong, closing this now...

ata4 commented 6 years ago

Yep, the default options of previous versions aren't implemented yet. It's all WIP right now.

ghost commented 6 years ago

Thanks mate for the heads up!

I was so blind that I just used r6-56 like all the other older builds and didn't even thought about that the Multi-threaded checkbox was unticked.

I'll make sure that I look at the settings dialog window a bit more carefully next time!