Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8380217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:24:00+00:00 2026-06-09T16:24:00+00:00

My Android app has a custom AsyncTask to make a rest call for a

  • 0

My Android app has a custom AsyncTask to make a rest call for a list of objects. I’m using Jackson to convert my response into Java and I am seeing about 30 garbage collections calls when mapping the Json via ObjectMapper.readValue(). Interestingly enough, if I make the same call a second, third, fourth time (by selecting a refresh button), there is only a single GC call. Any ideas why this is happening on the first call every time I start my Android App?

AsyncTask.java

doInBackground() {

HttpGet request = new HttpGet(url);
HttpClientUtil.setJsonAccept(request);
HttpResponse response = httpClient.execute(request);
HttpEntity responseEntity = new BufferedHttpEntity(response.getEntity());

// Call that garbage collect 30+ times the first exectution
ArrayList<MyObject> responseCollection = mapper.readValue(responseEntity.getContent(), new TypeReference<ArrayList<MyObject>>(){});

return responseCollection;
}

LogCat Output

07-10 11:05:13.484: D/dalvikvm(5518): GC_CONCURRENT freed 497K, 5% free 14030K/14727K, paused 3ms+4ms
07-10 11:05:13.484: D/dalvikvm(5518): GC_CONCURRENT freed 497K, 5% free 14030K/14727K, paused 3ms+4ms
07-10 11:05:13.484: D/dalvikvm(5518): GC_CONCURRENT freed 497K, 5% free 14030K/14727K, paused 3ms+4ms
...
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T16:24:02+00:00Added an answer on June 9, 2026 at 4:24 pm

    The GC on Android is aggressive overall, it doesn’t necessarily have anything to do with Jackson. More info here:

    Technical details of Android Garbage Collector

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When using a custom dialog in an Android App how is it then possible
I've created a custom button in my Android app that has basically two different
The app I'm struggling to make has a simple list and a button present
My Android app has a ContactsList activity in which I simply display a list
My android app has a two word app name, and the 2nd word doesn't
The Android Music app has a nice implementation of the ViewPager . When sliding
I have an android app which has native code. The native code needs to
I have an Android app that has an Application class and I have another
I've an android app that has multiple views. I've disabled the automatic orientation switching
I'm writting an android app which has to send a picture on a wcf

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.