Emulator Issues #6381
closedMerging of the branch 'shader-uids-awesome' has caused big performance regression of more than 30%.
0%
Description
I tested using the exact same settings (copy paste of the config folder) and d3d9 backend with a build prior and after the merge of 'shader-uids-awesome'(dolphin-master-3.5-1415-x64 and dolphin-master-3.5-1473-x64 from http://dl.dolphin-emu.org/builds/).
I used two games for my testing: Beach Spikers for gc and Fzero X for gc.
With Beach Spikers my fps during intro demo play went down from 74 fps to 40 fps.
With Fzero during the start of a GP race fps went down from 45 minimum to 30 minimum.
I will try to test some more if need be and provide more info, generally though there is a big speed hit after dolphin-master-3.5-1473-x64 up to the latest build.
Updated by kostamarino almost 12 years ago
Hmm seems that games that need EnableFPRF = True in their game ini are mainly affected.
Updated by NeoBrainX almost 12 years ago
- Status changed from New to Work started
Please check performance with the shader-uids-awesome-after-hours branch. If the branch happens to be noticeably faster, I'm particularly interested how each of the two commits in the branch sped up the games on their own.
Fwiw, if you come across any glitches new in that branch, feel free to tell me about those as well.
Updated by kostamarino almost 12 years ago
I tried revision bdc28106eed0 but the results are similar for the games mentioned above. I even tried to backtrack and find if shader-uids-awesome branch ever worked without speed hit for those two games but it seems it was always the case (starting from working builds from that branch since dx9 doesn't work at all at the first builds of it).
Updated by NeoBrainX almost 12 years ago
I've just pushed revision 597a6b34cb14 to the branch. Does it help? I'll need to do some more digging if this one is slow, too :/
Updated by kostamarino almost 12 years ago
Unfortunately it is the same. I noticed a constant spam of the message below in fzero btw when major slowdown happens, don't know if it might help:
Src\IndexGenerator.cpp:90 E[Video]: AddList: unknown count of vertices found
Updated by NeoBrainX almost 12 years ago
Are you sure that
a) the slowdown isn't caused by the error spam? Try disabling logging in the log configuration
b) the slowdown doesn't happen in the latest master revision before the shader-uids-awesome merge?
Updated by kostamarino almost 12 years ago
a)Yes, i disabled logging, same thing.
b)Yes, the difference was big enough to notice it easily each and every time i switched between dolphin-master-3.5-1415-x64 and dolphin-master-3.5-1473-x64 or any other rev after that. I am getting a constant slowdown with sound crackling throughout the stage with f zero while i was getting a small slowdown mainly on the beginning previously and full speed in most of the race. I tried switching various settings and disabling framelimit but the result was always the same: way lower fps since dolphin-master-3.5-1473-x64 and afterwards.
Updated by kostamarino almost 12 years ago
Right, it seems you are on the right track and spotted the issue, most if not all of the lost performance is back after revision ba310ce096da, it still seems to be about 10% slower than it was but most of the lost performance is definitely back. Now i will need to make a log file of fps to track the difference with certainty, since if there is some it is not that big to be certain about it.
Updated by kostamarino almost 12 years ago
Hmm, after more testing it seems what i wrote above holds, a lot of the lost performance is back after the last rev but not all of it.
Updated by delroth over 11 years ago
- Priority set to High
- Category set to gfx
- Relates to performance set to Yes
- Operating system N/A added
@kostamarino: we fixed another performance regression "recently" (a few weeks ago), could you try again?
Updated by JMC4789 over 11 years ago
Performance is not back on the games I play.
Updated by kostamarino over 11 years ago
I can confirm the above, performance is still worse than before the merge. Tested using 3.5 1720 and d3d9. At the beginning of a tournament race in fzero it dropped down to 35 fps whereas before it dropped to 45 fps during the beginning of a race.
Updated by degasus over 11 years ago
Can anyone on windows please profile what the uid generator on windows do? I didn't see any differences here on gcc, but as this branch depends on compiler optimizions, other ones may fail.
Also importend for performance is the std::map lookup, but as this is still a simple compare loop, I think it shouldn't be changed.
Updated by NeoBrainX over 11 years ago
The remaining performance regressions should be fixed in revision 627f99310eea (currently available in the shader-uids-optimization branch).
Updated by JMC4789 over 11 years ago
I tested this thoroughly now, and while most of the performance is back, there is still up to 5 - 6% performance missing in some games. From my testing, it still points to the Shader-UID-awesome merge.
Updated by kostamarino over 11 years ago
I will again agree with what JMC4789 said above, it is noticeably faster but still lacking a bit, although i have no way to confirm whether some other rev is responsible for the missing performance since then. For example now i get 40 fps in a certain spot in F-zero whereas with master i got 35 and before the merge 45.
Updated by NeoBrainX over 11 years ago
- Status changed from Work started to Accepted
- Milestone deleted (
Current) - Priority changed from High to Normal
I guess the remaining performance regression is not release critical, even though it should probably be looked into.
Updated by delroth over 11 years ago
- Milestone set to Current
- Priority set to Normal
It should still be looked at since it could be an easy performance win (especially since there's no reason this merge should introduce slowdowns). Reducing priority but keeping the current milestone.
Updated by delroth over 11 years ago
- Milestone changed from Current to Next
Compilers are stupid, moving to milestone-next and thinking about how to do this without confusing compilers.
Updated by degasus over 11 years ago
Can please someone retry this on revision 3fcdf5e25b95 - 3.5-2322 ?
It may speedup the uid map lookup :-)
Updated by kostamarino over 11 years ago
It seems that it does, i tried fzero and beach spikers and i think it is the same as before the merge. Now i am getting 43 fps at the beginning of the grand prix for a second compared to 39-40 before that lasted longer, i would consider this issue pretty much fixed. From 30fps after the merge now it is up to 43 fps momentarily (about 45 fps before the merge). Perhaps there is something tiny still left there, but it is no longer a big performance regression. If not marked as fixed the title should probably be changed.
Updated by degasus over 11 years ago
- Status changed from Accepted to Fixed
The uid generator is still a bit slower (but reduces the state better), but the map lookup (which may be called much more often) is now as fast as before.