I am using Retrofit 2 in my Android application, and I have a lot of network calls. I ran into performance issues and after a long research, I saw that I have too many running threads in my app. I printed all the active threads in the app and saw a specific thread that had too many instances (several hundred) by the name of "OkHttp ConnectionPool" - I'm assuming it's connected to my retrofit calls.
Is there a way to prevent this thread from flooding the system?