×

Discussion Board

Results 1 to 8 of 8

Thread: screen flushing

  1. #1
    Regular Contributor
    Join Date
    Jun 2009
    Location
    Tel-Aviv Israel
    Posts
    410

    screen flushing

    hey guys,

    here is the thing, I've been running simulation of my application on a few devices and was interested to find that on my phone (N97) without any component to draw on the screen, with only flushing the buffer of the canvas, the performance is less then acceptable, 30ms execution time and with 200 animations on screen the performance reaches terrible levels. on the other hand on my wifes device W995 Sonyericsson the performance with 200 animations on screen execution time is less then 20ms, isn't these numbers surprising? so what, there is no way I can actually use the entire screen size of my N97 with out damaging performance?

    Adam.
    Thanks,
    Adam Zehavi.

  2. #2
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: screen flushing

    First of all comparing devices is pretty difficult ands actually non-linear : a device with a 300 mhz cpu doesn't have to be 50% faster than a device with a 200 mhz cpu...
    This is esepecially true when comparing different manufacturers, it might be that Nokia and SE use completely different KVM's, the one might be more optimized on the underlying hardware than the other... SE's for example have different kinds of buffers for Images than Nokia's... There might be even more "variety" regarding other manufacturers (Samsung, LG etc)...
    Actually I do not get the "flushing of the canvas buffer", as most modern devices do support a double-buffered Canvas out of the box..

  3. #3
    Regular Contributor
    Join Date
    Jun 2009
    Location
    Tel-Aviv Israel
    Posts
    410

    Re: screen flushing

    perhaps you did not understand my comparison:
    N97 W995
    condition -------------------------------device 1------------device 2

    on only flushing 200x20 ----------- 2ms ------------- 1ms

    not a single component
    draw full size canvas buffer ------- 30ms ------------- 5ms

    with 200 animations on screen
    draw full size canvas buffer ------- 57ms ------------- 20ms

    and if you take under consideration that the screen size of the N97 is almost 4 times bigger then the W995, its clear to see the effect of the size of the screen.

    so you see the problem here?

    these are real numbers!!

    it has nothing to do with the device, and its CPU or memory, in relative to the devices them selfs you can see that there is an issue flushing full screen on large screen devices, regardless if the N97 is slower a bit.
    Last edited by TacB0sS; 2010-04-19 at 09:39.
    Thanks,
    Adam Zehavi.

  4. #4
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: screen flushing

    As I said, it might simply be that the KVM of the N97 is slower than the one on the SE...
    Still what you mean with flushing isn't that clear to me, do you simply mean painting the screen ? Or are you using some sort of custom double-buffering thus flushing the off-screen data to screen ?
    After all, what I can conclude from your numbers is that the nokia still comes around the 20 fps, which to me doesn't sound as too bad...
    The fact will remain that some devices are faster than others, even when running the same code and having virtually the same hardware...
    Are you using some kind of multi-threading, are you using the wait() method somewhere ?

  5. #5
    Regular Contributor
    Join Date
    Jun 2009
    Location
    Tel-Aviv Israel
    Posts
    410

    Re: screen flushing

    hey,

    by flushing I mean painting the canvas buffer to the screen:
    gameCanvas.flush(x,y,w,h); // to flush region.
    gameCanvas.flush(); // to flush entire buffer to screen.

    and no there is nothing running except the paint method, and the performance analyzing code.
    Thanks,
    Adam Zehavi.

  6. #6
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: screen flushing

    hhmmm.. you might want to have a look at this wiki for a standard Canvas loop using a Thread :
    http://wiki.forum.nokia.com/index.ph...animation_loop

    personally I have never used flush() method, and to me it sounds a little exotic

    Also Graham made a great post once regarding a blueprint of a game loop, can't find it though... I'm not sure if a Wiki article was made out of that, can you help us out Graham ?

  7. #7
    Regular Contributor
    Join Date
    Jun 2009
    Location
    Tel-Aviv Israel
    Posts
    410

    Re: screen flushing

    my implementation is a bit more complicated then this... but in the loop I have paint() and update();
    and just this week I changed my painting design to be terribly more efficient then it was... :-)
    Thanks,
    Adam Zehavi.

  8. #8
    Regular Contributor
    Join Date
    Jun 2009
    Location
    Tel-Aviv Israel
    Posts
    410

    Re: screen flushing

    Graham, any idea, regarding post 1 question?
    Thanks,
    Adam Zehavi.

Similar Threads

  1. Softkey lables on touch screen phones
    By mattbrenner in forum Mobile Java General
    Replies: 1
    Last Post: 2010-04-12, 18:21
  2. Replies: 10
    Last Post: 2008-09-24, 12:06
  3. Nokia E61: screen export into PAL/NTSC
    By yana_flash in forum Streaming and Video
    Replies: 9
    Last Post: 2006-10-30, 22:55
  4. Direct Screen Access (Please Comment!)
    By earamsey in forum Symbian
    Replies: 1
    Last Post: 2006-07-28, 18:34
  5. how to change Screen from Form to FullCanvas
    By ihadreampp in forum Mobile Java General
    Replies: 3
    Last Post: 2003-08-15, 08:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×