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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:14:53+00:00 2026-06-11T02:14:53+00:00

I am doing some sort of benchmark for sqlite android. If I were to

  • 0

I am doing some sort of benchmark for sqlite android. If I were to pre-load total of 120k before executing, will most device have enough memory? While the queries are executing, there are also other threads that are going on so memory might be the problem. How can I make use of the onLowMemory() method? There doesn’t seem to be much examples on using that method. Thanks for any advice.

  • 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-11T02:14:54+00:00Added an answer on June 11, 2026 at 2:14 am

    Making use of the method is as easy as overriding it in your Activity.

    However, read the documentation carefully:

    This is called when the overall system is running low on memory, and
    would like actively running process to try to tighten their belt.
    While the exact point at which this will be called is not defined,
    generally it will happen around the time all background process have
    been
    killed
    , that is before reaching the point of killing
    processes hosting service and foreground UI
    that we would like to
    avoid killing.

    Applications that want to be nice can implement this method to
    release any caches or other unnecessary resources they may be holding
    on to.
    The system will perform a gc for you after returning from
    this method.

    I’m not sure (and the docs don’t define) if “background process” includes AsyncTask instances and services, or just backgrounded applications, but I would guess so.

    So, when this method is called (if it is ever called) the System has already killed everything it could (with lower priorities than your Activity) and now asks you to release any unnecessary resources in memory.

    So, If you want to react on low memory, this might be too late already.


    As for the general question if most Android devices would run out of memory, I don’t know. The problem is, that devices vary a lot.

    I also find it hard to imagine any real live situation, in which you would need to pre-load (or stack) 120k queries before executing. You could easily stack 200 and commit those, than stack another 200 and so on.


    I’m not sure why you need to benchmark this, but please don’t execute 120k queries for default entries in your applications database.

    You can deliver your application with a filled database and copy it over from the assets/-folder. See android-sqlite-asset-helper

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

Sidebar

Related Questions

I am doing some sort of lab test record collection but there is a
I am doing some sort of science with a combination of Python, bash scripts
I am doing some sort of cronjob inside a WordPress plugin that does the
I'm doing some computer network homework and I'm supposed to develop some sort of
Basically, I'm doing some sort of image processing using a screen-sized rectangle made of
I am doing some sort of drawing software in WPF, and I have certain
I am doing some sort of directory in ASP.NET, in which everyone has phone
I'm doing some Android development, and I much prefer Visual Studio, but I'll have
I started doing some thinking about creating an Android application that can be used
Doing some jquery animation. I have certain divs set up with an attribute of

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.