Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Nov 2006

    Issues and performance problems in the J2ME library


    I am reporting 3 issues here, 2 that existed on all J2ME versions and another one on the recent releases (at least starting from June/July).
    The version I tried was for MIDP 2.0.

    1)- If the client cannot connect (server down, TCP problem, etc), it goes into a very long or infinite loop trying to reconnect again and does not pause between retries, leading to 100% usage on the midlet (I noticed this using the emulator and the network monitor).
    Also, if during this loop I make stopConnection (usingn a custom menu), it still continues to loop (after stopConnection, it goes into Off, but it seems the retry in the MIDP library process immediately puts it into "Connecting" status)

    2)- If the lightstreamer server rejects the session (either because the metaadapter invalidated the user or because the server rejected the number of sessions), the client library does not notify this to the midlet using OnServerError and it keeps retrying. Looking in more details, it seems that the server in this case sends in the HTTP reply "ERROR\n\r<digit>\n\rSOME_CUSTOMER_ERROR" (digit could be 0, 7, etc) and the midp library breaks it down into "ERROR", <digit> and "SOME_CUSTOMER_ERROR" and does not notify these to the midlet (it seems it is missing a default "else" when the string does not start with "SYNC ERROR", a digit, "KeepaliveMillis", "SessionId", etc).
    Note that the documentation for the network adapter says the server is supposed to send "ERROR <Digit> SOME_CUSTOMER_ERROR" (basically space instead of \n\r).

    This issue prevents displaying any error coming from MetaAdapter or LS to the client (like wrong username/password, etc), which is quite annoying...

    3) the performance issue was noticed on Windows mobile 5 and N95, E60 and N80.
    With the old MIDP libraries and the demo library (which was used on the website applet a year ago), the library used to run in Streaming mode with quite a large load and no impact on midlet performance (menus were responsive, diaplay refresh fast, etc). But with the new libraries (starting in June or July), it started to cause a major slowdown (nothing is responsive), as if there was a background thread in the library hogging the CPU.
    I don't know how to obtain a thread dump on a midlet, so it is quite difficult to know what happens.

    Any ideas or hints for these 3 problems ?


  2. #2
    Power Member
    Join Date
    Jul 2006
    Cesano Maderno, Italy

    1. I'm going to try to reproduce this issue and I will let you know as soon as possbile.
    2. This is a known bug we have just fixed (the fix will be available in the next distribution). Btw if you need it soon I can send to you a preview (send me a MP in case).
    3. This is pretty strange. Which client version (build number) are you using? Maybe you have a version with the log enabled. Using the emulator, do you see any log line in the console? In that case I'm sorry it was my fault and the next release will fix your problem. Otherwise, is the same issue visible on our online demos? Can you please give me some details on your application to reproduce the issue?

  3. #3
    Power Member
    Join Date
    Jul 2006
    Cesano Maderno, Italy
    about 1:
    the connection loop is infinite, this is not an error. Note that the reconnection loop is not a strict loop as the error and the reconnection attempt live on different threads so it's strange that you get a 100% cpu load (I was unable to reproduce such behavior, do you have an example that I can try?). Anyway I've added a 100ms pause for the next release, hope that helps.

    I've noticed that it's impossible to stop the loop, you're right, I fixed it.

    Thank you very much for your feedback.



Similar Threads

  1. Stress Test / Performance
    By rmusco in forum General
    Replies: 5
    Last Post: January 4th, 2013, 12:38 AM
  2. Replies: 3
    Last Post: January 8th, 2010, 11:28 AM
  3. Performance problem
    By achittoda in forum Adapter SDKs
    Replies: 1
    Last Post: December 22nd, 2009, 09:15 AM
  4. Performance test for Lightstreamer
    By quanhm in forum General
    Replies: 1
    Last Post: May 19th, 2008, 09:48 AM
  5. Replies: 1
    Last Post: May 28th, 2007, 05:33 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT +1. The time now is 12:50 PM.