Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2009

    app performance issue across phones

    I have an app that works great on the N95 and N82, but is extremely sluggish on others, such as N96, N81, E73, N85, N86. Once diff is the 95/82 have graphics hw accel, but graphics is not the issue. I have a number of short mp3 files that need to be played based on certain events. Each event triggers a specific sound, but if no events happen, the current sound must loop. Two players for each sound were instantiated and initialized at startup to eliminate startup time the first time a sound is played.

    Using 2 players gets the looping ok on n95/n82 (a timer alternates starting one or the other near the end of the sound's cycle), with slight 'blip' on sound overlaps. Events can change very quickly from one to the next and the sounds start playing accordingly, pretty close to when the events happen. However, on the other phones, there is a distinct 1/4 to 1/2 sec or so pause in-between loops and sometimes only play a sound once without looping. Likewise, the same processing pause dramatically affects playing sounds for each succeeding event that comes in and the sound simply cannot keep up, making this function on these other phones absolutely useless.

    The N95 and N81 have canvas double-buffering enabled, and I've also tried not doing any screen updates during this time, but there was no difference in sound performance (or lack of).

    Can anyone provide an idea as to why the other phones have such a sluggish performance for this compared to the N95 and N82?

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2007

    Re: app performance issue across phones

    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

  3. #3
    Registered User
    Join Date
    Mar 2009

    Re: app performance issue across phones

    Thanks for the reference. Based on what those docs indicate for the rules they outline, unless I'm missing something, the setup and playing of sounds should be ok. In a nutshell, the flow of events:

    main midp app:
    - instantiates classes
    - creates 2 players for each sound and puts them into the prefetch state. Each player is stored in a hashtable keyed by the sound name (one hashtable per player set of sounds).

    all sounds are handled in a separate class running a thread. The thread looks for sounds that were added to a queue.
    when sound is needed, its filename is added to the sound class queue. The sound thread starts the sound for that player's sound file by looking up the player in the hashtable.
    a timer is started based on the length of the sound.
    if no other sounds occur, the timer fires and the sound is restarted by starting it again using the sound's other player.
    if another sound is needed, it is started and the sound being played is stopped.

    This works great on the N95 and N82. All graphics and sound will keep up in real-time as they are dynamically changed. However, any other phone, such as N96, N81, N85, E73, N86, have a significant lag in sounds being played vs what should be played in realtime. Even graphics starts to lag as processing can't seem to keep up. Many times, the app will 'hang' to such a degree as requiring a power cycle of the phone. However, if you disable the sound functionality by not using the players, the graphics on these other phones will keep up in realtime as you should expect and the app runs with no problems.

    This is not a gaming application but if it was, you wouldn't want it to be limited to just a few phones...you'd limit your audience and wouldn't sell many games. The only common thread in this is the N95/N82 have a 3d hw graphics accelerator and none of the others have it. Is this significant? Likewise, these 2 phones use a Dual Arm processor. However, the N96 has a dual, but it has the same problems with the sound.

    Any further ideas?

Similar Threads

  1. how to increase the performance for j2me app in phone
    By garyshi in forum Mobile Java General
    Replies: 5
    Last Post: 2011-11-02, 11:34
  2. Replies: 16
    Last Post: 2007-07-16, 05:25
  3. Issue with APp deployment on 6265i
    By romar_mro in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2006-09-10, 07:15
  4. Socket performance issue in 7650
    By prsens in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2003-06-23, 10:37
  5. Java performance on Nokia Phones
    By EdHowson in forum Mobile Java General
    Replies: 2
    Last Post: 2002-05-16, 17:38

Posting Permissions

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