How reusing connections results in efficient networking on android?How to efficiently count the number of keys/properties of an object in JavaScript?How do save an Android Activity state using save instance state?How to check if a service is running on Android?Why is the Android emulator so slow? How can we speed up the Android emulator?How do I pass data between Activities in Android application?How do I display an alert dialog on Android?How can I connect to Android with ADB over TCP?How do I rotate the Android emulator display?How to manage startActivityForResult on Android?Comparison of Android networking libraries: OkHTTP, Retrofit, and Volley

Quote from Leibniz

Why is tomato paste so cheap?

Is 12 minutes connection in Bristol Temple Meads long enough?

What are the holes in files created with fallocate?

On studying Computer Science vs. Software Engineering to become a proficient coder

Why did the metro bus stop at each railway crossing, despite no warning indicating a train was coming?

Extracting sublists that contain similar elements

Unexpected Netflix account registered to my Gmail address - any way it could be a hack attempt?

If current results hold, Man City would win PL title

Does gravity affect the time evolution of a QM wave function?

How do I interpret improvement in AUC ROC from the business perspective?

Earliest use of "rookie"?

Is Germany still exporting arms to countries involved in Yemen?

return tuple of uncopyable objects

Does Lawful Interception of 4G / the proposed 5G provide a back door for hackers as well?

Tikz draw contour without some edges, and fill

Was this character’s old age look CGI or make-up?

On what legal basis did the UK remove the 'European Union' from its passport?

Is there anything special about -1 (0xFFFFFFFF) regarding ADC?

Entering the UK as a British citizen who is a Canadian permanent resident

How to cope with regret and shame about not fully utilizing opportunities during PhD?

Non-deterministic Finite Automata | Sipser Example 1.16

Is there any good reason to write "it is easy to see"?

Developers demotivated due to working on same project for more than 2 years



How reusing connections results in efficient networking on android?


How to efficiently count the number of keys/properties of an object in JavaScript?How do save an Android Activity state using save instance state?How to check if a service is running on Android?Why is the Android emulator so slow? How can we speed up the Android emulator?How do I pass data between Activities in Android application?How do I display an alert dialog on Android?How can I connect to Android with ADB over TCP?How do I rotate the Android emulator display?How to manage startActivityForResult on Android?Comparison of Android networking libraries: OkHTTP, Retrofit, and Volley






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I was going through the android docs for Efficient Network Access. I got the data prefetching part as well as the batch transfer approach, basic crux behind both of them being



Don't keep the network radio in active state all the time. let it go to stand by state at regular intervals



However, proceeding to the next section, Reduce Connections, I am still not clear with some of the statements. They are:




Reusing connections also allows the network to more intelligently react to congestion and related network data issues




and




it would be more efficient to make a single request for every news article to be returned in a single request / response than to make multiple queries for several news categories




and




A useful compromise is not to close the connection immediately, but to still close it before the inherent timeout expires




Can someone please explain these statements in detail?










share|improve this question






















  • Regarding the second quote, a single request/response for N items will involve less data transfer than will N requests/responses for 1 item each, as each request and response adds overhead (e.g., HTTP headers). This gets worse if you are not reusing connections and we have to create and tear down sockets for each request/response. And, this gets all the worse if you are using HTTPS (which you should!), as we have to do all of the TLS handshaking N times.

    – CommonsWare
    Mar 23 at 13:02











  • hmm, makes sense. I was only thinking in the direction of whether the duration for which network radio keeps awake will be reduced. I think it's not guarranteed, but on average it definitely will. In case where I am getting the whole data in just 1 request, server might also take longer to send response. But considering the handshake times also as you mentioned, it's a no-brainer then to use a single connection.

    – Yashasvi
    Mar 23 at 14:02

















0















I was going through the android docs for Efficient Network Access. I got the data prefetching part as well as the batch transfer approach, basic crux behind both of them being



Don't keep the network radio in active state all the time. let it go to stand by state at regular intervals



However, proceeding to the next section, Reduce Connections, I am still not clear with some of the statements. They are:




Reusing connections also allows the network to more intelligently react to congestion and related network data issues




and




it would be more efficient to make a single request for every news article to be returned in a single request / response than to make multiple queries for several news categories




and




A useful compromise is not to close the connection immediately, but to still close it before the inherent timeout expires




Can someone please explain these statements in detail?










share|improve this question






















  • Regarding the second quote, a single request/response for N items will involve less data transfer than will N requests/responses for 1 item each, as each request and response adds overhead (e.g., HTTP headers). This gets worse if you are not reusing connections and we have to create and tear down sockets for each request/response. And, this gets all the worse if you are using HTTPS (which you should!), as we have to do all of the TLS handshaking N times.

    – CommonsWare
    Mar 23 at 13:02











  • hmm, makes sense. I was only thinking in the direction of whether the duration for which network radio keeps awake will be reduced. I think it's not guarranteed, but on average it definitely will. In case where I am getting the whole data in just 1 request, server might also take longer to send response. But considering the handshake times also as you mentioned, it's a no-brainer then to use a single connection.

    – Yashasvi
    Mar 23 at 14:02













0












0








0








I was going through the android docs for Efficient Network Access. I got the data prefetching part as well as the batch transfer approach, basic crux behind both of them being



Don't keep the network radio in active state all the time. let it go to stand by state at regular intervals



However, proceeding to the next section, Reduce Connections, I am still not clear with some of the statements. They are:




Reusing connections also allows the network to more intelligently react to congestion and related network data issues




and




it would be more efficient to make a single request for every news article to be returned in a single request / response than to make multiple queries for several news categories




and




A useful compromise is not to close the connection immediately, but to still close it before the inherent timeout expires




Can someone please explain these statements in detail?










share|improve this question














I was going through the android docs for Efficient Network Access. I got the data prefetching part as well as the batch transfer approach, basic crux behind both of them being



Don't keep the network radio in active state all the time. let it go to stand by state at regular intervals



However, proceeding to the next section, Reduce Connections, I am still not clear with some of the statements. They are:




Reusing connections also allows the network to more intelligently react to congestion and related network data issues




and




it would be more efficient to make a single request for every news article to be returned in a single request / response than to make multiple queries for several news categories




and




A useful compromise is not to close the connection immediately, but to still close it before the inherent timeout expires




Can someone please explain these statements in detail?







android performance android-networking






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 23 at 12:58









YashasviYashasvi

3,19622147




3,19622147












  • Regarding the second quote, a single request/response for N items will involve less data transfer than will N requests/responses for 1 item each, as each request and response adds overhead (e.g., HTTP headers). This gets worse if you are not reusing connections and we have to create and tear down sockets for each request/response. And, this gets all the worse if you are using HTTPS (which you should!), as we have to do all of the TLS handshaking N times.

    – CommonsWare
    Mar 23 at 13:02











  • hmm, makes sense. I was only thinking in the direction of whether the duration for which network radio keeps awake will be reduced. I think it's not guarranteed, but on average it definitely will. In case where I am getting the whole data in just 1 request, server might also take longer to send response. But considering the handshake times also as you mentioned, it's a no-brainer then to use a single connection.

    – Yashasvi
    Mar 23 at 14:02

















  • Regarding the second quote, a single request/response for N items will involve less data transfer than will N requests/responses for 1 item each, as each request and response adds overhead (e.g., HTTP headers). This gets worse if you are not reusing connections and we have to create and tear down sockets for each request/response. And, this gets all the worse if you are using HTTPS (which you should!), as we have to do all of the TLS handshaking N times.

    – CommonsWare
    Mar 23 at 13:02











  • hmm, makes sense. I was only thinking in the direction of whether the duration for which network radio keeps awake will be reduced. I think it's not guarranteed, but on average it definitely will. In case where I am getting the whole data in just 1 request, server might also take longer to send response. But considering the handshake times also as you mentioned, it's a no-brainer then to use a single connection.

    – Yashasvi
    Mar 23 at 14:02
















Regarding the second quote, a single request/response for N items will involve less data transfer than will N requests/responses for 1 item each, as each request and response adds overhead (e.g., HTTP headers). This gets worse if you are not reusing connections and we have to create and tear down sockets for each request/response. And, this gets all the worse if you are using HTTPS (which you should!), as we have to do all of the TLS handshaking N times.

– CommonsWare
Mar 23 at 13:02





Regarding the second quote, a single request/response for N items will involve less data transfer than will N requests/responses for 1 item each, as each request and response adds overhead (e.g., HTTP headers). This gets worse if you are not reusing connections and we have to create and tear down sockets for each request/response. And, this gets all the worse if you are using HTTPS (which you should!), as we have to do all of the TLS handshaking N times.

– CommonsWare
Mar 23 at 13:02













hmm, makes sense. I was only thinking in the direction of whether the duration for which network radio keeps awake will be reduced. I think it's not guarranteed, but on average it definitely will. In case where I am getting the whole data in just 1 request, server might also take longer to send response. But considering the handshake times also as you mentioned, it's a no-brainer then to use a single connection.

– Yashasvi
Mar 23 at 14:02





hmm, makes sense. I was only thinking in the direction of whether the duration for which network radio keeps awake will be reduced. I think it's not guarranteed, but on average it definitely will. In case where I am getting the whole data in just 1 request, server might also take longer to send response. But considering the handshake times also as you mentioned, it's a no-brainer then to use a single connection.

– Yashasvi
Mar 23 at 14:02












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55313958%2fhow-reusing-connections-results-in-efficient-networking-on-android%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55313958%2fhow-reusing-connections-results-in-efficient-networking-on-android%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현