Results 1 to 4 of 4
  1. #1
    Senior Member
    Join Date
    Nov 2006
    Location
    Riyadh
    Posts
    33

    NumberFormatException constantly generated by LS Client library

    Dear all,

    Something I noticed a while ago but only now I am writing about it.
    I seems that the j2me client library is internally testing a string being a number by using Integer.parseInt(). This generates a lot of NumberFormatException logging in J2ME emulator when exception tracing is enabled.
    This does not cause the code to fail as I believe this is as designed, but performance wise, I don't think this is the best way to test if a string is a number.
    Exceptions are known to be performance killers in Java and usually should not be used to handle normal cases. In J2ME, I have a feeling it is causing some pauses in the application.

    Regards,
    A

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Hi,
    You're right about exceptions but we don't feel this as a big issue since cases of non-number parsed with parseInt appear only few times per each connection (create_session.txt and bind_session.txt).
    In any case we're going to change that piece of code in a future release.

    About the pause, is it possible that pauses are caused after onBufferFull calls?

  3. #3
    Senior Member
    Join Date
    Nov 2006
    Location
    Riyadh
    Posts
    33
    Actually in my case, it happens much more frequently. Between once every 2 sec to several times every sec.
    I capture onBufferFull events and log them but it does not happen.
    I used the very latest MIDP 2.0 client.

    Regards,
    A

  4. #4
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Hi rsouissi,

    sorry for the long delay, we've ready a build of the J2ME client that fixes the problem.
    That build will be available on the next release (that should be at the end of august) but if you want to preview it just send an email to support@lightstreamer.com .

 

 

Similar Threads

  1. iOS Client Library Preview
    By Alessandro in forum Client APIs
    Replies: 0
    Last Post: March 28th, 2011, 03:06 PM
  2. Javascript library file size
    By athanasius in forum Client APIs
    Replies: 3
    Last Post: December 3rd, 2009, 10:57 AM
  3. customizing Javascript Library
    By rd2008 in forum Client APIs
    Replies: 2
    Last Post: April 28th, 2009, 10:03 AM
  4. shared library jar files
    By gadder in forum General
    Replies: 1
    Last Post: October 26th, 2007, 10:50 AM
  5. Generated bookmarklet-like links
    By Mone in forum Client APIs
    Replies: 0
    Last Post: October 22nd, 2007, 11:07 AM

Bookmarks

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 11:01 AM.