PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Performance questions.

Hello,

I have two questions regarding GapiDraw 2.05 performance:

1. I use BltFast, and performance drops significally even on stationary PC (abnormally, maybe about 60%) if I use Opacity (GDBLTFAST_KEYSRC | GDBLTFAST_OPACITY). It happens even if I use very small surfaces. If I just turn off GDBLTFAST_OPACITY performance is good again. What am I doing wrong? Does GapiDraw use hardware acceleration for opacity, because I worked in Direct3D and giving opacity to textures on accelerated hardware almost does not affect performance?

2. On PPC performance drops from 30 fps to 12 fps when I start to move stylus, when I stop using it performance returns to 30 fps. This happens even if I dont do anything OnStylusMove. Is there any workaround or this is PPC problem?

Thanks in advance!
ppcStudios · 29 Nov 2003, 02:12 UTC — Performance questions.
A. Cicak wrote:
2. On PPC performance drops from 30 fps to 12 fps when I start to move stylus, when I stop using it performance returns to 30 fps. This happens even if I dont do anything OnStylusMove. Is there any workaround or this is PPC problem?


This is typical on many/most devices and sadly, there is no real workaround for it (I sure hope someone can prove me wrong on this as I would love to know how to compensate for it).
1. I use BltFast, and performance drops significally even on stationary PC (abnormally, maybe about 60%) if I use Opacity (GDBLTFAST_KEYSRC | GDBLTFAST_OPACITY). It happens even if I use very small surfaces. If I just turn off GDBLTFAST_OPACITY performance is good again. What am I doing wrong? Does GapiDraw use hardware acceleration for opacity, because I worked in Direct3D and giving opacity to textures on accelerated hardware almost does not affect performance?


GapiDraw uses DirectDraw, which does not support Opacity. Check:
(a) that the surfaces you are using with the blit are not created in video memory. Add the flag GDSURFACE_SYSTEMMEMORY to CreateSurface, otherwise GapiDraw will try to create the surface in video memory.
(b) that the backbuffer is located in sysmem if you are using opacity to blit to it. Add the flag GDDISPLAY_BACKBUFFERSYSMEM to display flags in the CGapiApplication configuration.

2. On PPC performance drops from 30 fps to 12 fps when I start to move stylus, when I stop using it performance returns to 30 fps. This happens even if I dont do anything OnStylusMove. Is there any workaround or this is PPC problem?


As ppcstudios says, this is an issue on all Pocket PCs and is frequently asked on in the forums. Check this recent thread for more info:
http://www.pocketmatrix.com/forums/view ... hp?t=13790
Kak · 29 Nov 2003, 10:08 UTC — Performance questions.
ppcStudios wrote:
This is typical on many/most devices and sadly, there is no real workaround for it (I sure hope someone can prove me wrong on this as I would love to know how to compensate for it).


I've been hearing about this problem since my very start of ppc development, however I never noticed it in my device (3630). Is that problem only related to some pocket PCs or it should be affecting all of them?
It occurs on many but not all devices. I do all of my basic testing on a 3635 and I only see the framerate drop a couple fps when I move the stylus around like a madman. If I remember correctly, the problem is that the message pump gets flooded with move events, and rather than merging identical events the OS tries to process every single event which then loads down the processor.
No the problem is simply that polling the touchscreen takes a lot of time.
Thierry wrote:No the problem is simply that polling the touchscreen takes a lot of time.


On all ipaq devices the touchscreen driver seem to avoid this problem...

I think the cause is badly written software, but it's very deep in the OS...