The Following User Says Thank You to DavyP For This Useful Post: | ||
|
2012-03-29
, 19:36
|
Posts: 306 |
Thanked: 603 times |
Joined on Jan 2012
@ Belgium
|
#482
|
The Following User Says Thank You to DavyP For This Useful Post: | ||
|
2012-03-29
, 19:37
|
Posts: 3,074 |
Thanked: 12,960 times |
Joined on Mar 2010
@ Sofia,Bulgaria
|
#483
|
The Following User Says Thank You to freemangordon For This Useful Post: | ||
|
2012-03-29
, 19:43
|
Posts: 3,074 |
Thanked: 12,960 times |
Joined on Mar 2010
@ Sofia,Bulgaria
|
#484
|
JBenchmark:
http://davy.preuveneers.be/phoneme/p...mo/jbenchmark/
Note: only JBenchmark and JBenchmark2 work. The others require
more JSR support
Davy
|
2012-03-29
, 19:46
|
Posts: 306 |
Thanked: 603 times |
Joined on Jan 2012
@ Belgium
|
#485
|
Thanks a lot.
OK, second optimization pass (memcpy is gone), JBenchmark2 result(same conditions)
landscape - 972
portrait - 804
going to try your benchmarks, will post theresults here.
|
2012-03-29
, 19:48
|
Posts: 3,074 |
Thanked: 12,960 times |
Joined on Mar 2010
@ Sofia,Bulgaria
|
#486
|
If you would repeat the experiment multiple times, you will notice
that the 2% below is even below the error margin. So I am very
doubtful there is any improvement at all :-)
And about the memcpy: I am pretty sure you will bump into
synchronization issues between two event loops (one of phoneme
and one of the Qt4 frontend). The phoneME backend calls a
method in the Qt4 frontend to say it is time to paint the buffer. The
Qt4 front-end will emit an asynchronous signal. By the time this
signal is processed the original buffer has changed, resulting in
flickering and painting of intermediate frames if you use the
original buffer.
But feel free to experiment, you never know ... :-)
Davy
The Following 2 Users Say Thank You to freemangordon For This Useful Post: | ||
|
2012-03-29
, 20:31
|
Posts: 306 |
Thanked: 603 times |
Joined on Jan 2012
@ Belgium
|
#487
|
|
2012-03-29
, 20:53
|
Posts: 3,074 |
Thanked: 12,960 times |
Joined on Mar 2010
@ Sofia,Bulgaria
|
#488
|
Another remark:
It is possible that the above results are not accurate for another reason. The performance results are measured based on what happens in the event loop of phoneME. This event loop triggers in the Qt4 front-end app a signal emit. So most of what you measure is computation related, not screen IO related. The actual repainting is done in the event-loop of the Qt4 front-end, and it is possible that in this event-loop multiple repaint events are coalesced into a single one (i.e. a single screen update). So the actual painting time in the Qt4 event loop is not included in the benchmark, and the actual screen updates could be lower than what you measure.
Davy
The Following User Says Thank You to freemangordon For This Useful Post: | ||
|
2012-03-29
, 22:00
|
Posts: 306 |
Thanked: 603 times |
Joined on Jan 2012
@ Belgium
|
#489
|
But the same could happen with your code, i.e. there is no check if the current buffer has been painted before doing memcpy over it. And it is less possible to happen without memcpy, as there are 2 screens buffers used by libcvm, against just 1 when memcpy is used. Anyway, i will implement some buffer synchronization, I promise .
On the other hand both threads are CPU bound, so when there is less overhead (because there is no memcpy for every screen buffer), the computational thread is given more CPU shares to do its job, so I believe the benchmark results are pretty corect.
The Following User Says Thank You to DavyP For This Useful Post: | ||
|
2012-03-29
, 22:44
|
Posts: 3,074 |
Thanked: 12,960 times |
Joined on Mar 2010
@ Sofia,Bulgaria
|
#490
|
True. I don't check before the memcpy either as I don't want to force paint every frame either if the device cannot keep up.
Anyway, I don't want to discourage you in any way. The only point I wanted to make is that I am always careful with interpreting benchmarks, especially if I don't know what they are measuring :-),
but any frame rate improvement you can squeeze out of it would be most welcome.
Cheers,
Davy
that the 2% below is even below the error margin. So I am very
doubtful there is any improvement at all :-)
And about the memcpy: I am pretty sure you will bump into
synchronization issues between two event loops (one of phoneme
and one of the Qt4 frontend). The phoneME backend calls a
method in the Qt4 frontend to say it is time to paint the buffer. The
Qt4 front-end will emit an asynchronous signal. By the time this
signal is processed the original buffer has changed, resulting in
flickering and painting of intermediate frames if you use the
original buffer.
But feel free to experiment, you never know ... :-)
Davy