Page 1 of 2 12 LastLast
Results 1 to 20 of 31
  1. navinag's Avatar
    Posts
    455 Posts
    Global Posts
    489 Global Posts
       #1  
    I would like to try and come up with a way to figure out what apps or processes that are running on the pre that causes it to slow down. After a Luna restart...my pre is zippy (1.3.1). I noticed when I open up the launcher after discarding an app that it still has the last application listed for a second or two. During this second or two the Pre is very sluggish...It seems that the pre is doing some clean up but it takes to long.

    What tools are available in this WEBOS linux that may help me figure this out.

    I can run top....but that does not seem to tell me what apps are running...it appears to be encapsulated in LunaSysMgr. Maybe I have overlooked something.


    Maybe its a memory leak..

    Maybe it is left over junk from apps....

    What ever it may be.. I would like to get to the bottom of this.

    My goal would be to create some sort of script that could do some housekeeping if possible and you would run it when you pre starts to slow down...or possibly be able to identify the apps that are causing the issues.
  2. #2  
    maybe its to much email in trash folders or just to much email altogether . That one of the things that slows this phone.
    ĦṔ-Ḷṫ-Ŧḯη
    Here is a direct link to webOS Doc for all carriers
    http://www.webos-internals.org/wiki/...octor_Versions
    P.S. if i have helped you and you are thankful please hit the thanks button to the right---->
  3. navinag's Avatar
    Posts
    455 Posts
    Global Posts
    489 Global Posts
       #3  
    Quote Originally Posted by Shadavis08 View Post
    maybe its to much email in trash folders or just to much email altogether . That one of the things that slows this phone.
    I have noticed that email slows the phone doewn... I tend to delete my emails and archive the one that I want to keep via my desktop when ever I get to it. This way the inbox on my pre stays pretty clean.

    I am using mvapp and all my email resides on /medial/internal......now...

    I have noticed, on a side note, before i moved my email and after, that the emails still stick around in the email buckets even after I delete them from my Pre. Is everyone else seeing this?

    I currently have 11mb of email storage used but I have no email in my pre inbox.

    My email is set for manual and does not store more than 1 day at a time on my pre.


    ***This is a good start.....keep the ideas coming. This thread may also generate some sort of optimization scheme for the Pre****
  4. #4  
    I would bet it is a memory leak issue.
    Pilot 1000 -> Pilot 5000 ->Palm Pilot Professional -> HP 620LX -> TRG Pro -> Palm V -> Palm Vx -> Palm M505 -> Palm i705 -> Palm Tungsten|T -> Samsung i500 -> Treo 600->Treo 650 -> Treo 600-> Treo 700p ->Centro ->Treo 800w + Redfly C8n -> Palm Pre -> HP Touchpad
    R.I.P Palm 1996-2011
  5. navinag's Avatar
    Posts
    455 Posts
    Global Posts
    489 Global Posts
       #5  
    Quote Originally Posted by rc46 View Post
    I would bet it is a memory leak issue.

    Please define what you mean by memory leak. This term gets thrown around too much.
  6. #6  
    Quote Originally Posted by navinag View Post
    Please define what you mean by memory leak. This term gets thrown around too much.
    I think rc46 is using the term correctly here...

    Basically, it's when a program hasn't cleanup up one (or more) of it's operations correctly. The result is that it uses space in the memory perpetually, which in turn lowers the amount of available memory to the OS and other apps.

    When you reboot your device the memory is cleared, that is why it speeds up again. Unfortunately, narrowing down which app is the cause is usually a trial & error thing.
    MoBill - Use your Authorize.net account to bill your customers with your webOS device!!
    MoJack - Track your lost or stolen webOS device from anywhere!
    Time to get VIRAL
  7. #7  
    none of our pre's are zippy btw. but, yes it is probably a memory leak. good luck.
  8. #8  
    I was experiencing memory problems that seemed to have cleared up after I stopped playing m:mafia.
  9. navinag's Avatar
    Posts
    455 Posts
    Global Posts
    489 Global Posts
       #9  
    Quote Originally Posted by Laxidasical View Post
    I think rc46 is using the term correctly here...

    Basically, it's when a program hasn't cleanup up one (or more) of it's operations correctly. The result is that it uses space in the memory perpetually, which in turn lowers the amount of available memory to the OS and other apps.

    When you reboot your device the memory is cleared, that is why it speeds up again. Unfortunately, narrowing down which app is the cause is usually a trial & error thing.
    I wasn't trying to indicate he was using the term incorrectly...just eanted to make sure we were talking about the same thing....I agree that is probably some sort of memory leak but there has to be a way to detect it....without trial and error..


    does the same thing happen to people that have never installed any homebrew or installed any patches..."never been tweaked"?
  10. #10  
    The issue is that 1.2.1 disabled autoGarbageCollection for event listeners. What that means is, if an app is not doing correct cleanup of its event listeners, the app never actually closes when you throw it away. My app Dealert started showing this problem after 1.2.1, and this is what I nailed it down to. Since then, I cleaned up all of my event handlers and solved the problem, but I only found out about it because I was using the palm-worm tool they give developers.

    If other devs are not aware of this, they need to be. Their apps may never be truly closing, eating up memory and service handlers, resulting in a slower OS.
    Developer of:

    -------------------------------------
    Discuss my apps in my developer forum
  11. #11  
    Technically a memory leak is where code doesn't free memory from objects when they are no longer usable or reachable. In C, you have direct access to memory allocation through malloc and free. In WebOS memory deallocation is not direct, but instead occurs through 'garbage collection'. The javascript code notifies the OS when objects are no longer needed. Those objects continue to sit on the memory stack until the OS decides to 'collect' all the garbaged objects and deallocate their memory.

    Apparent memory leaks on the Pre and associated slowdowns could be the result of sloppy code that fails to garbage objects properly. I'd classify this as a true memory leak. However, as some of the developers have indicated many of the WebOS slowdowns come from the unpredictability of the garbage collection. Garbaged objects might persist for some time before the OS decides to clear them. This is particularly problematic for games because when the garbage collection routine is active, there seems to be an overall system slowdown.
  12. navinag's Avatar
    Posts
    455 Posts
    Global Posts
    489 Global Posts
       #12  
    Quote Originally Posted by Kev1000000 View Post
    The issue is that 1.2.1 disabled autoGarbageCollection for event listeners. What that means is, if an app is not doing correct cleanup of its event listeners, the app never actually closes when you throw it away. My app Dealert started showing this problem after 1.2.1, and this is what I nailed it down to. Since then, I cleaned up all of my event handlers and solved the problem, but I only found out about it because I was using the palm-worm tool they give developers.

    If other devs are not aware of this, they need to be. Their apps may never be truly closing, eating up memory and service handlers, resulting in a slower OS.
    I agree that devs need to be more diligent with their apps. I would like to read a bit more about this worm tool. Can you point me to some documentation?
  13. navinag's Avatar
    Posts
    455 Posts
    Global Posts
    489 Global Posts
       #13  
    Quote Originally Posted by Kev1000000 View Post
    The issue is that 1.2.1 disabled autoGarbageCollection for event listeners. What that means is, if an app is not doing correct cleanup of its event listeners, the app never actually closes when you throw it away. My app Dealert started showing this problem after 1.2.1, and this is what I nailed it down to. Since then, I cleaned up all of my event handlers and solved the problem, but I only found out about it because I was using the palm-worm tool they give developers.

    If other devs are not aware of this, they need to be. Their apps may never be truly closing, eating up memory and service handlers, resulting in a slower OS.
    I agree that devs need to be more diligent with their apps. I would like to read a bit more about this worm tool. Can you point me to some documentation?

    I recall another thread claiming to renenable event listeners but someone pointed out
    that is was disabled in 1.2.1...

    I any case...does turning on automatic grabage collection improve our current lag...?

    How does someone go about making this change?
  14. navinag's Avatar
    Posts
    455 Posts
    Global Posts
    489 Global Posts
       #14  
    Quote Originally Posted by jfelectron View Post
    Technically a memory leak is where code doesn't free memory from objects when they are no longer usable or reachable. In C, you have direct access to memory allocation through malloc and free. In WebOS memory deallocation is not direct, but instead occurs through 'garbage collection'. The javascript code notifies the OS when objects are no longer needed. Those objects continue to sit on the memory stack until the OS decides to 'collect' all the garbaged objects and deallocate their memory.

    Apparent memory leaks on the Pre and associated slowdowns could be the result of sloppy code that fails to garbage objects properly. I'd classify this as a true memory leak. However, as some of the developers have indicated many of the WebOS slowdowns come from the unpredictability of the garbage collection. Garbaged objects might persist for some time before the OS decides to clear them. This is particularly problematic for games because when the garbage collection routine is active, there seems to be an overall system slowdown.

    So is webos allowing apps to do their own gsrbage coollection?
    then perhaps the apps can do it and when the app closes....the os can also doit? Will that possibly help?
  15. #15  
    Quote Originally Posted by navinag View Post
    I would like to try and come up with a way to figure out what apps or processes that are running on the pre that causes it to slow down. After a Luna restart...my pre is zippy (1.3.1). I noticed when I open up the launcher after discarding an app that it still has the last application listed for a second or two. During this second or two the Pre is very sluggish...It seems that the pre is doing some clean up but it takes to long.

    What tools are available in this WEBOS linux that may help me figure this out.

    I can run top....but that does not seem to tell me what apps are running...it appears to be encapsulated in LunaSysMgr. Maybe I have overlooked something.


    Maybe its a memory leak..

    Maybe it is left over junk from apps....

    What ever it may be.. I would like to get to the bottom of this.

    My goal would be to create some sort of script that could do some housekeeping if possible and you would run it when you pre starts to slow down...or possibly be able to identify the apps that are causing the issues.
    you should have a trash folder that needs to be emptied in each email account ,at least i do.
    ĦṔ-Ḷṫ-Ŧḯη
    Here is a direct link to webOS Doc for all carriers
    http://www.webos-internals.org/wiki/...octor_Versions
    P.S. if i have helped you and you are thankful please hit the thanks button to the right---->
  16. superrad's Avatar
    Posts
    47 Posts
    Global Posts
    50 Global Posts
    #16  
    This happens to me too. Let's say i'm listening to some music player remix. Then i get hard and heavy with internet browsing. The system just bogs down like no other. But after a minute or two it's back up to normal. I may even get the too many cards open error, (even though i don't have any cards open)
  17. #17  
    Quote Originally Posted by navinag View Post
    So is webos allowing apps to do their own gsrbage coollection?
    then perhaps the apps can do it and when the app closes....the os can also doit? Will that possibly help?
    In each app/stage/scene assistant there in a "cleanup" method that performs tasks right before the app closes. This is where developers are to "garbage collect". The problem stems from developers forgetting (or not knowing) to clear out stuff like event listeners as Kev1000000 pointed out.

    Actually, I didn't know that webOS wasn't cleaning up on it's own as of 1.2.1 (I clear out all un-needed objects anyway). Even if the OS were to auto garbage collect, it's just plain sloppy code to leave it in simply because you can. You may as well free up as much memory as you can as quickly as you can. As a matter of fact, I wish there were a way to complete destroy variables in JavaScript (like the unset() function in PHP).
    MoBill - Use your Authorize.net account to bill your customers with your webOS device!!
    MoJack - Track your lost or stolen webOS device from anywhere!
    Time to get VIRAL
  18. DrewPre's Avatar
    Posts
    818 Posts
    Global Posts
    829 Global Posts
    #18  
    Try this....

    next time you restart your Pre, shell into it and use ps -ef and watch the processes go by .... look for [defunct]... I see a lot of this at start up. I saw it in my own service when I didn't close a file I had open for buffered reading. When I closed the file in the code, the defunct went away.

    Would this qualify as a memory leak? From what I have read, defunct is just a place holder that the system uses and there is not really an app running there.

    If this is a memory leak, ...even if it isn't ....but can be a source of problems.....I see a lot of services that exhibit this symptom.
  19. #19  
    Quote Originally Posted by superrad View Post
    This happens to me too. Let's say i'm listening to some music player remix. Then i get hard and heavy with internet browsing. The system just bogs down like no other. But after a minute or two it's back up to normal. I may even get the too many cards open error, (even though i don't have any cards open)
    That isn't necessarily a memory leak. It sounds like you're just using most of the available memory the Pre has right at that point in time (there are limits to everything!). Basically, you are filling up memory faster than the CPU can process it. When they activate the GPU (Graphics Processing Unit), that will take some of the load off of the CPU and will (hopefully) speed things up a bit.
    MoBill - Use your Authorize.net account to bill your customers with your webOS device!!
    MoJack - Track your lost or stolen webOS device from anywhere!
    Time to get VIRAL
  20. #20  
    I don't know the 1st thing about programing, but from my very heavy use of the pre since june 6 I can tell you if you want to identify the biggest memory leak native to the pre, look no farther than the BROWSER. There's got to be some major cleanup opportunity in that code.
Page 1 of 2 12 LastLast

Posting Permissions