- Should be somewhat faster than 5.00b3.
- All the savers should work properly on both PPC and Intel Macs.
Please let me know if you find either of those to not be the case.
I think this is getting really close to being called a non-beta release, since at this point I'm not sure I'm not sure I'm going to be able to make any further headway on performance. I'm pretty much out of ideas on that front, short of "throw away most of the work I've done so far, and re-implement Xlib in terms of OpenGL instead of in terms of Quartz". Which, as you may imagine, I'm not particularly eager to do.
The reason it works on Intel Macs is that Apple finally replaced my busted iMac, and the replacement is an Intel Core Duo. And it is OMG fast! Seriously, it seems like compilations are around 2.5× faster than before, and all the screen savers run way faster too (so there goes any hope of having decent xscreensaver performance on slow machines, since I won't even be able to tell there's a problem any more...)
The one exception to this speed-up is, of course, Photoshop. Photoshop is a fucking dog, since Adobe still hasn't released an Intel build of CS2, meaning it runs in the PPC emulator. It feels like it's running at 75% to 50% of the speed it ran on my PPC iMac, and it uses a truly gargantuan amount of memory. Like, after editing a dozen pictures, closing them all, and hiding Photoshop, minutes later it was still consuming 6% CPU and almost 1.5 GB RAM.
So if you use Photoshop more than XCode or other Apple-provided software, I'd say stay the hell away from the Intel machines until Adobe gets their shit together.
The exception to this is if you have a crappy G$, say 1GHz or slower. Photoshop on my MacBookPro (2GHz) is significantly faster than it was on my G4 867.
I have a friend who has a G4 tower (circa 2004) and he gave me an 80mb .psd file to test on the MacBook we've got at work.
Holy Crap! The performance increase was incredible. Three seconds for Photoshop to launch, another couple to open the file. I then fucked around with the image for a few minutes (adding layers, changing colors, placing elements, and so on) without saving. Then I hit "revert" and it took less than 5 seconds before I was back to the original file. On his old machine, my friend could have gone for coffee while waiting for the file to revert, and returned hoping Photoshop hadn't crashed.
Sure, if you're replacing a two year old machine. But today you can spend your money on an Intel, or on a PPC. If you spend your day in Photoshop, you will get literally twice as much for your money if you go PPC instead of Intel.
Not going to happen, because they don't have one. Apparently Adobe's SCM doesn't support tags...
As for your Todo list:
Oh, alternative for number six: [[textField cell] setLineBreakMode:NSLineBreakByTruncatingHead];... but doing it right is still a better idea. :-)
2: I'm afraid "some extra logic is needed" doesn't tell me anything; I don't see what I can do about this.
3: I meant NSAssert(), which seems to turn into a Cocoa exception. And now that I think about it, it's possible that I've only seen this happen in my SaverTester framework and not in the actual ScreenSaverEngine, so maybe it's not really a problem. I'll test some more.
6: Is there some simple way to do that, or am I expected to roll my own?
7: I know that OpenGL manages to do things fast; but right now, I've got this gigantic pile of Quartz code that goes in through CGContextRef. I am not eager to rewrite all that code in OpenGL. Unless there's some way to do GLish things in a Quartz context, I think "use OpenGL for the copy" amounts to "throw away all your code and start over".
2: at some point, you're getting the value from an
NSTextField
, and that value isnil
; you're then setting a preference value to that value. You need to either check fornil
when retreiving the value from the text field, and replace it with@""
, or check fornil
when setting the preference value, and using-removeObjectForKey:
instead of-setObject:forKey:
. Since both steps are presumably happening in the same place, it shouldn't be a big thing.3:
NSAssert()
behaviour is customisable; the default is to raise aNSInternalInconsistencyException
, and if you don't have any exception handlers the default one in the event loop will log a message and then try to continue, possibly leaving you in a confused state.6: not a hugely simple way... having actually looked now, you're not far off anyway. As I mentioned in a followup, there's a simple way to get the truncation behaviour you want. If you do want to use an icon, get the IconFamily class (MIT/X11 license), and use the handy
+iconFamilyWithIconOfFile:
and-imageWithAllReps:
methods to get an NSImage to pass to an image view. If I were a perfectionist, I'd suggest that this image view should be able to revieve drags... good thing I'm not, eh? :-)7: I can appreciate that. However, you should be aware that using OpenGL to transfer the pixels from a
CGBitmapContext
to screen wouldn't necessitate changing any of the drawing code; it's basically the modern-day equivalent of using hardware-specific page flipping. Mmm, page flipping... I'm not saying it needs to be top priority or anything.Some bugs and niggles:
[okButton setKeyEquivalent:@"\r"]; [cancelButton setKeyEquivalent:@"\e"];
That's the thing though, I'm not getting a nil value from NSTextField: I've just hooked that text field up to NSUserDefaultsController with 'bind', and the error is happening somewhere down in the bowels of that interaction, far away from my code.
Hmm. That sounds clearly buggy. *Pokes around a bit*
You can filter bindings using value converters. Lemme see how to do that programatically... *pokes* Value Transformers Programming Guide.
Hmm. When setting up bindings you can specify options... NSAllowsNullArgumentBindingOption and NSInsertsNullPlaceholderBindingOption + NSNullPlaceholderBindingOption may be relevant. Or not. I'm not really into bindings.
According to The Inquirer today, it will be almost another year for native Adobe apps to come about.
Adobe actually has a new feature when running PS CS2 in the PPC emulation mode. "Windows-like memory allocation"
You say, ". . .I don't use any Microsoft products and neither should you."
Does this mean you found a better keyboard? If so, please tell me what it is so I can recommend it to others!
Belkin Ergoboard.
The new naturals are for shit.
Kinesis Evolution, chair mount. Been using it for years, it's the only way to fly. Pictured here.
Mine turned five last month. Got it because of your gruntle and totally agree. They're updating the design now and "will have more information" this quarter, which I hope translates into "will be available this year." It's getting more and more flaky and I was dreading paying another arm and a leg for the exact same thing. (Serial mouse and the giant keyboard connector with adapters to PS2? Come on!)
I'll bet their "updated design" includes "chair-mount no longer available", given how much they were hyping the rail-mount as being the better way.
It must have been the week for getting new iMacs. Maybe there was something in the water.
Just one question. Is it possible to install all the screensavers at once? When I double click on one it says "Do you want to install this", and if I try to open a bunch at once, only one seems to get installed.
Copy them all to $HOME/Library/Screen Savers. The double-click issue is an Apple bug and should be reported as such - you can do so at https://bugreport.apple.com/ if you have an ADC account (free).
There is a README that explains this.
If someone wants to write me an "installer" AppleScript or something, that'd be nice. I tried, and it was hard enough to do the "cancel/replace all" dialog that I decided it wasn't worth the effort.
There is a new "bug" in beta 4. Seems to affect all of the savers. When the screen saver is initialized, the display blanks normally, then quickly inverts to a white screen, and then back to black as the screen saver starts. Rather annoying, and not present even back to the v4 alphas.
OS X 10.4.6 PPC, Millions of Colors.
I'm getting the same thing. Wild guess-- the back buffer isn't being cleared before the first time it's displayed.
There's another occurrence of FD_ZERO in hacks/fontglide.c that will break (__ERROR_use_memset_not_bzero_in_xscreensaver__) on BSD or Darwin. Same workaround as in sonar should do.
My experience, unfortunately has been with a 1.4ghz G4 and a 1.5ghz Core Solo.. as you can imagine, the G4 kicks the Solo's ass. The G4 has better video and the machines have fairly similarly matched cpus, but the G4 doesn't need any PPC emulation... Heck, even the Intel-compiled apps seem slow -- not too surprising, really.
I'm sure that the Core Duo is nicer than the Solo.. but surely, the Solo is a waste of money.