question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't increase max concurrent Gdx.net HTTP requests

See original GitHub issue

Please ensure you have given all the following requested information in your report.

Issue details

My app is triggering two HTTP requests, one of which might take a few seconds to load. I noticed however that the second request is not issued, until the first one completes. I would like for these HTTP calls to be made in parallel.Please provide the details of your issue

Reproduction steps/code

Looking in the code, the NetJavaImpl uses an new AsyncExecutor(1);, where 1 is the max concurrent requests. I would like to increase this (ie. to 2 or 3), however it doesn’t seem to be possible since it is hard coded to 1. https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/net/NetJavaImpl.java#L127 What would you recommend in order to make it possible to shoot multiple parallel HTTP requests to the server?

Version of LibGDX and/or relevant dependencies

1.9.6

Stacktrace

Please select the affected platforms

  • Android
  • iOS (robovm)
  • iOS (MOE)
  • HTML/GWT
  • Windows
  • Linux
  • MacOS

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
mgsx-devcommented, Dec 11, 2018

I would go for unbounded newCachedThreadPool which is IMO the common use case. Only few edge cases need to limit thread pool.

0reactions
mgsx-devcommented, Jan 9, 2019

Sounds good to me.

I would add a note in changes.md to explain this is a breaking change : maybe some client code rely on the old thread limit.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Increase Concurrent HTTP calls - Stack Overflow
One trick you can use to increase the number of concurrent conncetions is to host your images from a different sub domain. These...
Read more >
Frequently Asked Questions - Patients - Genova Diagnostics
Genova Diagnostics answers to the quick easy questions that can save you a phone call.
Read more >
NVIDIA DGX A100 User Guide
The DGX A100 is shipped with a set of six (6) locking power cords that ... The BMC password length must be a...
Read more >
How To Make HTTP Requests in Go - DigitalOcean
In your code, the first update is to change the HTTP server handler to return a fake JSON data response using fmt.Fprintf ....
Read more >
A simple way to limit the number of simultaneous clients of a ...
This is a simple and easily generalizable way to put an upper-bound on the maximum number of simultaneous clients to a Go net/http...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found