HTTP GET File; Slow

I’m experiencing severe drops in download speed when GET:ing an image from the File Storage using HTTP requests. From the moment my “handleHttpResponse” class is filling my byte array with the image data from File Storage, it takes well over 40 seconds before it’s completely finished.

I doubt it; but cannot say for sure that it’s my code that’s causing it? I might just be doing it wrong?
Here’s the download method:


 Backendless.Data.of(UserFileMapping.class).find(new AsyncCallback<BackendlessCollection<UserFileMapping>>() {
 @Override
 public void handleResponse(BackendlessCollection<UserFileMapping> fileMappings) {



 Iterator<UserFileMapping> iterator = fileMappings.getCurrentPage().iterator();



 while (iterator.hasNext()) {



 UserFileMapping fileMapping = iterator.next();
 profileURL = fileMapping.profile_url;



 }
 if (profileURL != null) {



 String userToken = HeadersManager.getInstance()
.getHeader(HeadersManager.HeadersEnum.USER_TOKEN_KEY);
 final Net.HttpRequest httpRequest = new Net.HttpRequest(Net.HttpMethods.GET);
 httpRequest.setHeader("user-token", userToken);
 httpRequest.setUrl(profileURL);



 Gdx.net.sendHttpRequest(httpRequest, new Net.HttpResponseListener() {
 @Override
 public void handleHttpResponse(Net.HttpResponse httpResponse) {
 final byte[] data = httpResponse.getResult();
 Gdx.app.postRunnable(new Runnable() {
 @Override
 public void run() {



 pix = new Pixmap(data, 0, data.length);
 downloadedImage = new Texture(pix);
 }



 });
 }
 }



 @Override
 public void failed(Throwable t) {
 }



 @Override
 public void cancelled() {
 }
 });
 }



 }



 @Override
 public void handleFault(BackendlessFault fault) {
 }
 });

I see that you wrote to us on Facebook that you were able to solve the problem. What was the solution?

Regards,
Mark

I haven’t found the root cause yet. But simply switching testing device helped and download speed was instantaneous then. So no fault’s on Backendless’s side, I simply had bad luck with my device as it seems.

Regards and thanks for a great service.