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 9237515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:33:07+00:00 2026-06-18T07:33:07+00:00

My last question was unanswered so I am trying a different approach. I load

  • 0

My last question was unanswered so I am trying a different approach. I load many textures (256×256 RGBA888) into memory on the fly and discard them when needed. Problem is that sometimes when I upload the texture to OpenGL ES it takes 40-80ms, rarely more. I figure out, that this slow time is after a garbage collection. Problem is, that this GC sometimes blocks the GL thread (FPS drop) and sometimes it blocks the texture loader thread (OK). Is there a good way to somehow not allow GC to happen on the GL thread?

I tried calling System.gc() on the texture loader thread after every 1, 2, 3…n textures are decoded and this effectively removed GC-ing on the GL thread, but now the textures load much slower, because that thread must wait for the GC to finish. Making the “n” bigger makes loading faster, but GC on the GL thread is more probable, thus choppy animations.

Is there some way to remove GC-ing on the GL thread for bitmaps decoded in a different thread? I do not decode/allocate any bitmaps on the GL thread and GC-ing happens only when new textures are loaded.

EDIT:
App targets android 3.2 and newer, also phones. This happens on phones (HTC One S – 4.0.3) and also tablets (Nexus 7 – 4.1, Galaxy Tab 2 10.1 – 3.2 and 4.0, Acer Icona A200 – 4.0)

  • 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-18T07:33:08+00:00Added an answer on June 18, 2026 at 7:33 am

    Thanks to this video there is an easy solution for same sized tiles and targeting Android 3.0 and newer.

    BitmapOptions.inBitmap which will reuse one Bitmap for every new tile, so no more furios GC-ing.

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

Sidebar

Related Questions

My last question wasn't explained very well. What I'm trying to do here is
Similar to my last question, but I ran into problem lets say I have
an extension of my last question, getDate with Jquery Datepicker , I am trying
Last question I asked was about how to draw different models in OpenGL. I
Building on my last question i'm trying to figure out how .local and .comm
My last question helped me get data from a form into an array. The
Actually in my last question I was trying to use the pipe command. I
My last question was not clear. Im trying to make a web service in
Possibly related to my last question (note: different error code): Why might the fatal
The last question I asked was something I stumbled upon when trying to understanding

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.