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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:52:28+00:00 2026-05-26T07:52:28+00:00

could you please suggest me (novice in Android/JAVA) what`s the most efficient way to

  • 0

could you please suggest me (novice in Android/JAVA) what`s the most efficient way to deal with a relatively large amounts of data?

I need to compute some stuff for each of the 1000…5000 of elements in say a big datatype (x1,y1,z1 – double, flag1…flagn – boolean, desc1…descn – string) quite often (once a sec), that is why I want to do is as fast as possible.

What way would be the best? To declare a multidimensional array, or produce an array for each element (x1[i], y1[i]…), special class, some sort of JavaBean? Which one is the most efficient in terms of speed etc? Which is the most common way to deal with that sort of thing in Java?

Many thanks in advance!

  • 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-05-26T07:52:28+00:00Added an answer on May 26, 2026 at 7:52 am

    Nick, you’ve asked a very generally questions. I’ll do my best to answer it, but please be aware if you want anything more specific, you’re going to need to drill down your question a bit.

    Some back-envolope-calculations show that for and array of 5000 doubles you’ll use 8 bytes * 5000 = 40,000 bytes or roughly 40 kB of memory. This isn’t too bad as memory on most android devices is on the order of mega or even giga bytes. A good ‘ol ArrayList should do just fine for storing this data. You could probably make things a little faster by specifying the ArrayLists length when you constructor. That way the Arraylist doesn’t have to dynamically expand every time you add more data to it.

    Word of caution though. Since we are on a memory restricted device, what could potentially happen is if you generate a lot of these ArrayLists rapidly in succession, you might start triggering the garbage collector a lot. This could cause your app to slow down (the whole device actually). If you’re really going to be generating lots of data, then don’t store it in memory. Store it off on disk where you’ll have plenty of room and won’t be triggering the garbage collector all the time.

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

Sidebar

Related Questions

Could you please suggest any simple Java statistics packages? I don't necessarily need any
Could please anybody suggest a way to deal with Inheritance regarding Page Objects pattern
could you please suggest me the way I could automatically resolve primary key conflicts
Could you please suggest how to deal with these situations ? I understand that
Could someone please suggest a good way of taking a global seed value e.g.
I am very new to Ruby so could you please suggest the best practice
I want your suggestion on the following pseudo-code. Please suggest how could I improve
Could someone please explain the best way to connect to an Interbase 7.1 database
Could you please suggest a simple SMTP server with the very basic APIs (by
Could you please suggest me the best possible answer to this question for a

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.