Performance Questions... [Archive] - Quintessential Forum

PDA

View Full Version : Performance Questions...


NPherno
03-03-2004, 06:10 PM
Alright, a thread very much aimed at Paul & Paul alone :)

So, some semi-random questions regarding skin authoring & render/draw/paint (pick your poison) performance...

I've noticed that the performance of my skin (the B71 beta'd Post-Graduate) isn't so hot when it's resized a significant amount. This machine isn't anything I'd consider 'slow' (1.7Ghz, 512MB RAM, etc), and I know that it's more than capable of non-GPU accelerated rendering some pretty advanced things at 1152x864 at 60fps (some software tools I wrote to do Hi-Poly UV Coordinate mucking... run quite fast in full-screen).

If QCD is drawing slowly over only only 1/10th the screen real-estate, I'd assume that it's cycles-per-pixel count is a significant amount higher than my own... which is scary given what my code is doing.

So, some questions that may help skinners better define thier own skins, and/or may help you adapt code that's potentially faster...

First, is there any performance gain/penalty for using 8-bit BMPs? Or RLE Compressed BMPs? One might assume that your in-memory shadow of all artwork is simple a DWORD aligned & expanded ARGB (or BGRA) Bitmap, both for speed & leaner code... and that the input format isn't relevant (and hell, if this were the case, that other input formats are easy additions... because a PSD file read, with the proper Layer support would make for some _mean_ skin packages).

Second, If you've unrolled your BLITing loops inside the skin engine, is there an ideal width/height multiplier for a skin's main size, or individual elements? Does the code use a different method to display elements that have an entirely 'rectangular' footprint as opposed to some odd shape due to masking (if not, depending entirely on your code design/layout/etc it's probably very easy, and very fast to add, and the performance gains are likely significant)? Old 8-bits per pixel code always ran faster with a 4-pixel width alignment, and no height bias... and always ran faster if you could DWORD align copies... if you unrolled BLITs further you could create faster cases for whatever unroll you'd setup. Myself, I always chose a 4 DWORD copy as ideal... so a 16 pixel alignment was king...

When dealing with resize area, is a 1 pixel resize zone slower than a 4 pixel or other 'aligned' area? Does your tiling copy code have an implicit preference?

I had other questions... but now I can't recall any of them! :)

Would love to hear what you think...
N

Paul
03-03-2004, 06:28 PM
If QCD is drawing slowly over only only 1/10th the screen real-estate, I'd assume that it's cycles-per-pixel count is a significant amount higher than my own... which is scary given what my code is doing.
Before we dive into performance tweaking, what in particular is drawing slow? Playlist scrolling? Visuals?

Paul
03-03-2004, 06:38 PM
First, is there any performance gain/penalty for using 8-bit BMPs? Or RLE Compressed BMPs? One might assume that your in-memory shadow of all artwork is simple a DWORD aligned & expanded ARGB (or BGRA) Bitmap, both for speed & leaner code... and that the input format isn't relevant
Yes, 32bit ARGB and input format isn't relevant.

(and hell, if this were the case, that other input formats are easy additions... because a PSD file read, with the proper Layer support would make for some _mean_ skin packages).
True, additional formats are easy to add. It's adding the layer support to the internal engine that is the work.

NPherno
03-03-2004, 11:32 PM
What's drawing slow?

Dragging the window (I have show contents on), is slow, and every 1.5 seconds or so the entire process stalls for about .5 seconds. The main window is quite wide, maybe 1024, and the playlist is docked below it, same width, and long enough to show 15 entries.

The 'first draw' after it's been minimized is quite slow too...

I have a GeForce4 (not MX, a real GF4 with 256MB of RAM) and the latest drivers, on WinXP Pro, running vanilla OS display (aka no theme override software like Windowshades, etc).

Playlist scrolling isn't terribly smooth, but then again, it's not terribly slow either, it's more than adequate, considering that the track count is 1200+.

Regarding PSDs:

I actually meant to suggest not that Layers as an active feature would be useful, but that Layers with specific names could make for some _great_ Skin packages. Example:

(layers in order from bottom to top (top drawing over bottom) - anything without QCD_ first is ignored (good for testing))

QCD_Map - The 'map.bmp'
QCD_Body - The 'body.bmp'
QCD_Play_UP - The play button's graphic, in it's 'correct' place, in 'up' state
QCD_Play_UPMO - Same button, now in Mouse Over state

As it stands this is very close to what my PSDs already look like :) I just have actions I made that rip them apart & make the final BMPs, which I have rebuild every time I resize an element (if only Photoshop had variables & some scripting...)...

I do not at all mean to suggest I have problems with QCD... I wouldn't make a skin for it if I didn't love it... I just want to know, coming from a programmer's perspective, if there are things skinners can do that are 'better' than others in areas that are easy to change or adapt. I mean, I myself don't mind making a skin a certain width multiple, or making my resize graphic have resize bars/zones of a certain width, etc...

N

Paul
03-04-2004, 12:23 AM
Dragging the window (I have show contents on), is slow
Now that's something I don't have control over. Windows normally maintains the contents of a window during drag. It won't even need to call QCD's drawing routines during a drag unless it gets obscured.

and every 1.5 seconds or so the entire process stalls for about .5 seconds.
My guess this is the CD Audio plugin. Go into the CD Audio plugin config, and on the TroubleShooting tab, check 'disable polling'.

The 'first draw' after it's been minimized is quite slow too...
Windows automatically flushes an apps working space to disk when it minimizes. So on restore, the app's state must be reread from disk. This normally isn't slow unless your drive is unusually slow or already thrashing on another task.