When will you need to create a separate process in the application?

I read an article on the Android Process and Threads developer blog that talks about creating a new process for a specific application component. But I did not understand when a new process will be created in my application. Could you help me understand the following doubts in this regard.

  • When, as a developer, should I feel like I need to have a separate process for Android / s components?
  • Does the introduction of a new process affect the overall performance of the application?

Any other information is greatly appreciated.

Thanks SKU

+5
source share
3 answers

, , , , "" ( , ). , , , ( - , !). , - , - . , , .

Android ( ), , , , " " (LMK) ( Google ). , , , , , , . , , - , , , . , , , , , , , . , , ; . , , ( , LMK), , "" (IE ). - , , .

: (, , ), , Activity .

, - . , , , , . , , .

+1

1.) - , , . , . , . : , -, .

2.) . AsyncTask , android.

0

1.) In android 4.0 (and possibly 3.0, not sure though). The device does not allow you to use the HTTP agent in the main thread, as this slows down the interface. This is when threads come in handy.

In addition, using functions that require a lot of CPUs, if they are executed in the user interface thread, the user interface will lag and not respond until the function completes.

2.), as indicated in 1, this will actually improve the visual performance of your application;)

0
source

All Articles