×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    102

    Lightbulb optimising my app

    hi
    My app have around 20 different thread classes as innerclass of my main midlet class
    each of them does different network operations(no two of them are called simultaneously).

    i read in wiki "reduce number of classes in app, Can get away with 2 classes: one MIDlet class and one Canvas class. "
    and also
    "Create a background thread in startApp() and reuse it. "

    So can i create one bg thread and use in my case.
    how do i create this bg thread?

    also now now my canvas is a innerclass of midlet class. does this have any performance prblems?
    Thnks in advance

  2. #2
    Regular Contributor
    Join Date
    Dec 2008
    Location
    Mumbai
    Posts
    199

    Smile Re: optimising my app

    hi ashwin

    This is not right way to develop application because latest Phone may support 20 thread in your application but your application in most phone will not work properly so first reduce your number of thread in your application

    thanks
    Ajay Prajapati
    Mobile Software Developer
    Mumbai,India

  3. #3
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: optimising my app

    In what way do you want to "optimize" your app? You want to make it smaller? Faster?

    You say you have 20 thread classes, but how many threads do you actually run at one time?

    Reducing the number of classes helps to reduce size, but I don't recommend you do this unless you need to make the application smaller (for example, if you need to install on a device with a small JAR limit).

    Avoid inner classes unless you have a very clear reason to use them. It's almost always better to use separate classes than inner classes. It is easier to manage separate source files, and it is easier to manage the connections between classes. Don't use inner classes simply to avoid passing a parameter, or implementing getter or setter methods. In particular, avoid anonymous inner classes.

    Graham.

  4. #4
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    102

    Cool Re: optimising my app

    i dnt call any two of them together.
    i want them to run independent of my main app thread. that's y i created seperate ones for each task

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

    Re: optimising my app

    hhmmm ok.. but do you mean that when you call a new Thread there is no other Thread (even of another class) running ?

  6. #6
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    102

    Re: optimising my app

    Quote Originally Posted by Tiger79 View Post
    hhmmm ok.. but do you mean that when you call a new Thread there is no other Thread (even of another class) running ?
    nops no other thread is running
    so can i combine all of them
    how do i do it?

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

    Re: optimising my app

    Im not sure I understand what you are asking nor what you are trying to do

Similar Threads

  1. Changing App Mgr settings from J2ME app
    By ddbhasin in forum Mobile Java General
    Replies: 6
    Last Post: 2007-09-21, 07:18
  2. why my app is not shown in emulator?....due to i have change UID
    By bharats in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2007-09-12, 06:49
  3. renaming app, how??
    By Audun Holme in forum Symbian
    Replies: 2
    Last Post: 2007-05-13, 12:10
  4. Dialog's clipping area (again). Nokia experts, please help
    By synov in forum Symbian User Interface
    Replies: 0
    Last Post: 2004-06-26, 14:35
  5. 7650 - go back, close my app not closing the container app
    By geran in forum Digital Rights Management & Content Downloading
    Replies: 1
    Last Post: 2002-12-05, 09:58

Posting Permissions

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