maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Performance of cairo in maemo 4 (https://talk.maemo.org/showthread.php?t=23348)

golam.sarower 2008-09-03 04:22

Performance of cairo in maemo 4
 
Dear all,
I am developing an application in maemomm for N810, where drawing is the main things. In case of drawing i am using cairomm. But the performance is not satisfiable. Actually what is the matter? is it really slow or my problem using it? Is there any body who can explain this matter! Will Gdk drawing be better than cairo?
Please reply.........!!!
Sarower

pycage 2008-09-03 09:31

Re: Performance of cairo in maemo 4
 
There is no 2D hardware acceleration on the Nxx0. So yes, Cairo is a bit slow.

Serge 2008-09-03 09:34

Re: Performance of cairo in maemo 4
 
You can use oprofile for benchmarking in order to identify performance bottlenecks: http://maemo.org/development/tools/doc/diablo/oprofile/

Even if it is cairo slowing everything down, at least you will get the list of functions that impact performance the most. You can also post oprofile report here if you are not sure about how to interpret it, I'm also curious.

golam.sarower 2008-09-08 10:35

Re: Performance of cairo in maemo 4
 
Dear Serge,

The reference that you have given is for Diablo. But as we are using "Chinook", i have tired to install the oprofile tool in the scaratchbox environment in the PC under the target "Arnel". Then is installed successfully in the PC. Then according to the Reference "http://maemo.org/development/tools/doc/chinook/oprofile/" it is not clear to me what to do next. Any way i have done the followings:

I tried to copy "zImage-oprofile-rx-34-200743" to the device "/tmp" directory from PC. But there shows error "Write Error: No space left in device". Any way I tried by keeeping it under the "MyDocs" directory of the device. but it can not find "flasher".....

What can i do now? Please give me a solution. Even i tried to install the "flasher" library in the device. But I failed to install it in the device.

Sarower

Serge 2008-09-08 11:52

Re: Performance of cairo in maemo 4
 
You need to run flasher utility from your desktop PC. There is also a way to flash kernel from the device itself, but as you are doing development, I suppose you already have linux installed so everything should be easier.

You can get some more information about using flasher utility in "3.7 Using Linux Flasher Tool" section of http://maemo.org/maemo_release_docum..._maemo_4.1.pdf

PS. Just curious, why are you prefering chinook over diablo?

golam.sarower 2008-09-09 05:09

Re: Performance of cairo in maemo 4
 
Hi Serge,

Ok, i am trying your solution. Any way, the reason that why i am using "Chinook" instead of "Diablo" cause, When i have started the development "Diablo" was not released during that time. "Chinook" was the latest release at that time.

When i am giving the command
"./tmp/flasher-3.0 -f --kernel /tmp/zImage-oprofile-rx-34-200749 -R"
from the root then it waits showing the following.

flasher v0.8.7 (Oct 17 2006)

Suitable USB device not found, waiting"

Don't understand what is the problem.


Sarower

lardman 2008-09-09 08:07

Re: Performance of cairo in maemo 4
 
Unplug power adaptor from device (leave it plugged into the wall and switched on as you're about to use it)
Switch device off
Once device is off, plug in USB cable, start flasher using your command line above.
Then, plug the power into the device, it will start booting and should be detected by the flasher which is waiting to see if appear on the usb connection.
This way there are no keys that need to be pressed to make it enter flashing mode.

golam.sarower 2008-09-24 10:11

Re: Performance of cairo in maemo 4
 
Hi Serge and Lardman,
Here is the oprofile log created from the device when the application is run there.

Please analyze it and have a feedback. Thanx........

Sarower

Serge 2008-09-24 17:47

Re: Performance of cairo in maemo 4
 
Sure, just give this log to us...

koos 2008-09-24 20:18

Re: Performance of cairo in maemo 4
 
From my experience, some things found to make cairo faster:
- make sure to render to an offscreen XPixmap, using gdk_cairo_create in expose-event should do that already,
- avoid using cairo_x_scale, calculate the scaling yourself
- round to pixel coordinates and use CAIRO_ANTIALIAS_NONE
- set operator to CAIRO_OPERATOR_SOURCE where possible
among the obvious optimalisations like repaint only changed rectangles, cache painting compositions in compatible surfaces etc.


All times are GMT. The time now is 15:38.

vBulletin® Version 3.8.8