java - Do Threads Add A Lot Of Overhead To An App? -


Matures as my app, I think that finding more and more uses for threads So far, I have around 25 threads, do all the important things and work together in the symphony.

I know that my app is around 15.5 MB resident. Compared to the browser (+/- 35MB) I feel very safe, but I see the resident size of my app ever growing.

The question is, how far is the upper part with adding a thread?

I am also wondering if the synchronized keywords have to face more latency with each new thread?

Thank you!

Threads are very useful, but they can be a threat as well. I am working on a project to check the dangers presented by an application. If you run the top through the ADB shell, it specifically tells you how an app is running.

You will see that the use of the processor is directly proportional to the number of threads. It means too much that the number of threads is upper even though they appear to keep their activity free from trapping periodically, then synchronizing their actions can be a real pain, and then you have stagnation Maybe, not very beautiful. Also many number of threads raise doubts about the behavior of an application. Therefore they should be used in those emotions which they are.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -