 |
 |
iTunes [windows] resizing is slow
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: May 2002
Status:
Offline
|
|
After installing iTunes for windows on a windows XP machine one of the first things I noticed was the fact that window resizing is very slow.
On OSX window resizing is slow for all applications on Windows XP window resizing is fast for almost all applications except iTunes.
What is Apple doing wrong what all Windows programmers do right?
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: May 2001
Location: Massachusetts, USA
Status:
Offline
|
|
I don't have a copy of Windows, let alone iTunes for Windows, to test this theory out on, but I suspect the difference is for two reasons.
One, and this one I'm certain of, is that iTunes' brushed metal texture involves a composited gradient over a texture... this is very complicated transparency. You'll notice that even on the Mac, brushed metal windows resize quite a bit slower than Aqua ones do, and that's with Quartz Extreme (on older Macs, iTunes for the Mac does outline resizing because it would be too slow otherwise).
A second reason might be that many of Apple's nifty visual effects rely on the fact that windows are double-buffered -- that is, a copy of the window contents is stored offscreen and only drawn over the current window contents when it's been fully drawn, composited, and wrapped up in a nice pretty bow. If you don't double-buffer a window, it can flicker when you do things like resize it (I believe many Windows applications flicker when resized for this very reason). Therefore, it's possible that Apple may have manually double-buffered iTunes' windows, which would result in a not insignificant speed hit (since everything is essentially drawn twice).
Put together, I think those two things should be sufficient to explain the slowdown -- and also, incidentally, to explain why window resizing on Mac OS X is slower than on Windows. It's not a difference in coding skill, just a difference in strategy.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2003
Status:
Offline
|
|
The same thing they did with Quicktime for Windows. They don't make any calls to Direct X or Direct Draw so there is no native GUI acceleration.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Apr 2001
Location: Columbia, MD
Status:
Offline
|
|
The whole thing is slow. It makes the processor on my 1.8 GHz p4 work at least as hard as on my 300 MHz iBook.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Mar 2001
Location: Florida
Status:
Offline
|
|
On the mac or PC, how often do you actually 'resize' the window? This could be just an observation, but if it's a whine I really don't see any merit as I have my window set to a comfortable size and other then minimizing it, I never find myself resizing it.
|
|
All Your Signature Are Belong To Us!
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: May 2001
Location: Massachusetts, USA
Status:
Offline
|
|
So it's term break, and I was kinda bored, so I built a little app to illustrate what I said before about double buffering. Check it out:
Buffering Example.zip
The application is simple (and built in REALbasic, to make the speed difference more obvious)  Click and drag in one of the fields to draw rectangles; option-drag to draw ovals. Then resize the window, and all the shapes will resize dynamically to match the window size. Since Mac OS X automatically double-buffers all its windows, what's actually being demonstrated here is the difference between double and triple buffering, but the results are the same. Complete appreciation of this requires a look at the source code (requires REALbasic, sorry) so you can see what each subclass does differently. Incidentally, this application also provides an example of true object-oriented programming.
Enjoy.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Apr 2003
Location: The City Of Diamonds
Status:
Offline
|
|
Originally posted by Phoenix1701:
So it's term break, and I was kinda bored, so I built a little app to illustrate what I said before about double buffering. Check it out:
Buffering Example.zip
The application is simple (and built in REALbasic, to make the speed difference more obvious) Click and drag in one of the fields to draw rectangles; option-drag to draw ovals. Then resize the window, and all the shapes will resize dynamically to match the window size. Since Mac OS X automatically double-buffers all its windows, what's actually being demonstrated here is the difference between double and triple buffering, but the results are the same. Complete appreciation of this requires a look at the source code (requires REALbasic, sorry) so you can see what each subclass does differently. Incidentally, this application also provides an example of true object-oriented programming.
Enjoy.
Would be cool if the app actually worked 
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: May 2001
Location: Massachusetts, USA
Status:
Offline
|
|
Hmm... sorry, it didn't occur to me that Stuffit might not be able to correctly decompress that zip file -- it was created using Panther. :/ Try clicking this instead:
disk://users.wpi.edu/~phoenix/macnn/...%20Example.dmg
You ought to be able to mount the disk image right over the network, and you ought to be able to run the application right from the disk image. Ain't Macs cool? 
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Sep 2001
Status:
Offline
|
|
Wow, cool. I didn't know you could mount a DMG over a network like that. Neat.  And that single buffered window resizes *way* faster than the double-buffered one. That was the idea, right?  I drew two boxes in each.
Anyway, cool stuff. I don't sit around resizing windows all day.  Who resizes iTunes anyway?
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jan 2002
Location: London, UK
Status:
Offline
|
|
From what I have seen elsewhere on the Web, it is possible that the speed of iTunes window resizing on Windows is related to the OpenGL capabilities of your graphics card's drivers. It appears that some cards/drivers don't support some of the OpenGL calls that iTunes makes, thus your machine reverts to drawing the windows in software mode, hence the slow redrawing.
No idea if that has any basis in truth...
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jul 2002
Status:
Offline
|
|
Why would iTunes call OpenGL to draw windows? It doesn't even use OpenGL for the visualizer.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|