Answers for "should i use singletone okhttpclient"

0

should i use singletone okhttpclient

OkHttp performs best when you create a single OkHttpClient instance and reuse it for all of your HTTP calls. 
This is because each client holds its own connection pool and thread pools. Reusing connections and threads reduces latency and saves memory. 
Conversely, creating a client for each request wastes resources on idle pools.
Posted by: Guest on September-17-2020

Browse Popular Code Answers by Language