Huge decrease in performance in SDL 1.2.15 on older Macs. |
Trev
|
I've tried hard over the years to keep PPC supported, and I think I have supported it longer than I probably should have. I think it is worth it to analyze how many people are still using PPC and consider it if is worth it to keep supporting it. I'm not sure you can even make PPC programs with the latest Xcode (at least without jumping through hoops).
I think it's a bad idea to have 2 different versions with different versions of SDL linked. That makes for a lot of overhead, and as time goes on, the difference in one version and the other will only grow. I think the best solution is to always just use the latest version. In my opinion, it's another reason to consider dropping PPC. |
|||||||||||
|
Hyper_Eye
|
Well I know of at least two active members of our user community who primarily use Odamex on ppc. Considering the fact that most users who download the software do so without becoming active in the community I believe there has to be more who do so if the active community is representative of our user base as a whole. Even if it was just those two active members that would be enough to convince me to continue supporting it. So let's assume that ppc support is a critical requirement of our software and that dropping support for it is the last option we would consider.
|
|||||||||||
|
Hyper_Eye
|
Another thing that I would like to note is that this is not primarily a PowerPC issue. It is a performance issue. Overall SDL is working fine on ppc. The code introduced to fix fullscreen in Lion seems to be much slower than the old code. I can only provide the results I have experienced with the machines that I have. I am willing to bet that this code is not much faster on an early single-core Intel Mac. So eliminating support for machines that have had fullscreen crippled by the Lion fix would probably require more than just eliminating PowerPC support.
|
|||||||||||
|
Trev
|
What exactly do you mean by slower? You talking about maximum fps? I suggest you try disabling various things in a controlled way and see what affects the speed. For example, try disabling images, then try disabling text, and so on, until you notice a speed improvement.
Have you tried SDL2? That's what I use now. |
|||||||||||
|
Hyper_Eye
|
What I mean by slow is that with SDL versions previous to 1.2.15 Odamex is perfectly playable on the machine in question in fullscreen mode. When I switch to 1.2.15 it becomes a slideshow. I know that it is the difference between the new fullscreen code and the old because the framework pulled from Wesnoth simply uses the old code for any version of OS X previous to Lion and the new code for Lion+. It works very well on both the machine that I'm having an issue with as well as a newer machine running Lion. The only problem is that it can crash when changing resolutions on both machines though I think it is unrelated to the fullscreen code. I think the crash in that framework is actually related to a windowed mode "fix" that was put in to make windowed mode faster which is typically much slower than fullscreen mode when using SDL on OS X. The code that was put in for that appears to use deprecated API which I see warnings about on the shell only when using that framework.
|
|||||||||||
|
Hyper_Eye
|
In order to show how much of a difference there is between SDL 1.2.14 and SDL 1.2.15 on Mac I used the Apple Developer profiler tool called Shark. I ran it with Odamex built against both versions of SDL and here are the results.
With SDL 1.2.14, which runs quite smoothly, this is the top of the Shark output (anything 1.0%+):
With SDL 1.2.15, which runs like a slideshow, here is the top of the Shark output (anything 1.0%+):
You can see the complete logs here: http://www.huntsvegas.org/development/odamex/Odamex%20SDL%2014%20-%20Time%20Profile.txt http://www.huntsvegas.org/development/odamex/Odamex%20SDL%2015%20-%20Time%20Profile.txt This is a pretty big difference. It is obvious that the slowdown is definitely in SDL. Also, as far as I can tell this slowdown doesn't only affect older hardware or 10.4 - 10.5. I see a noticeable difference in framerate on my Lion machine as well. Odamex has a max framerate of 35fps (inherited from Doom) but with the latest SDL I am seeing sub-30 with an Intel Core 2 Duo 2.26GHz, 8GB 1066MHz DDR3 memory, and Nvidia GeForce 9400 256 MB graphics adapter. There is no reason why this hardware shouldn't peg the max fps when running Odamex. I would like to collect the same information on this machine but Apple did away with Shark and replaced it with Instruments which is integrated into Xcode as far as I can tell. I will try to run that tool as soon as possible. |
|||||||||||||||
|
Hyper_Eye
|
Here is another Shark report using SDL 1.2.15 but this time I used a debug build.
The busiest path is the same as with the release build as they diverged at SDL_Flip() after I_FinishUpdate(). I think I just got more information out of the debug build. Here is the complete report: http://www.huntsvegas.org/development/odamex/Odamex%20SDL%2015%20Debug%20-%20Time%20Profile.txt |
|||||||||||||
|
Huge decrease in performance in SDL 1.2.15 on older Macs. |
Torsten Giebl
|
Hello !
I do not know the SDL internals very well, but it seems strange that it is spending most of its time in SDL_AddTimer and not some drawing function or something like that. Other emails in the archive said that changes in the OSX screen backend would cause slowdowns on older OSX versions, but nothing about SDL_Timer stuff. Is there any way to debug it further ? CU _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||
|
Hyper_Eye
|
The last post I made where I had used a debug build of SDL it shows Blit1to4() (called from SDL_SoftBlit()) as being the method eating up all the time. In both cases SDL_Flip() was on the stack. Because the first profile was created with a release build and the last one with a debug build I think I would put a lot more stock in the last one.
|
|||||||||||
|
Hyper_Eye
|
It seems that post never made it to the list. The forums were acting awfully funny at the time. Here is the post I am referring to: http://forums.libsdl.org/viewtopic.php?p=33257#33257
|
|||||||||||
|
Huge decrease in performance in SDL 1.2.15 on older Macs. |
Sam Lantinga
|
Can you do the same profile with SDL 1.2.14? Maybe palette hardware is no longer supported in 1.2.15?
On Mon, Jun 25, 2012 at 5:15 PM, Hyper_Eye wrote:
|
|||||||||||||
|
Huge decrease in performance in SDL 1.2.15 on older Macs. |
Ryan C. Gordon
Guest
|
On 6/25/12 8:15 PM, Hyper_Eye wrote:
If you built SDL with the newest tools and didn't set -mmacosx-version-min=10.4, it's likely that we think you want an SDL that's only meant to run on 10.7 or later, and so we removed all the legacy code from your build (as it will trigger deprecation warnings on the newer toolchain, and possibly get you rejected from the Mac App Store). A lot of effort was made to allow the deprecated code to be in there and do the right thing on older systems (while using the newer code on newer systems, too!), though, if you tell the system to build with an older SDK, so this might be a solvable problem for you. I've sort of come to the conclusion that the only way to ever win this game is to use OpenGL, though. --ryan. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
Hyper_Eye
|
I built it with Xcode3 on OS X 10.5 Leopard using a powerbook. I built against the 10.4 SDK and set the target to 10.4. I set it to build a 32-bit universal (ppc, i386) framework. Sorry I haven't gotten the 1.2.14 profiler results done yet. I've been short on time the last week. Thanks for looking at this issue.
|
|||||||||||
|