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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:35:20+00:00 2026-05-26T19:35:20+00:00

I am working on a mapping utility that requires a moderate amount of data

  • 0

I am working on a mapping utility that requires a moderate amount of data to be input into the app in CSV format. These CSV files may contain 100000+ records with each record containing roughly 50 items. I may need to open several of these files at a time. The data needs double precision, but not with every item in a record. These items may be cast to int or have toString called.

My question is this: My first thought was to create an ArrayList of double[]. My second thought was to create a custom data object (an ArrayList of MyDataClass) to hold this data in the forms I require. This would have me create a class with roughly 45-50 instance variables. I’ve never done anything on this scale and could use a little guidance on best practice for such a task!

  • 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-26T19:35:20+00:00Added an answer on May 26, 2026 at 7:35 pm

    Both aproaches are fine. It all depends on what you’ll do with the data. If it’s only data and doesn’t have any methods except getters, creating a class to hold them might be overkill. If you want to add some behavior to a row, then create a class. 50 fields in a unique class is a bit too much. You might split the class into logical groups, but it all depends on what the data represents.

    If we suppose that you have 10 files open, each with 100000 * 50 doubles, that makes around 380 MBs. You must add the memory for every array of doubles, and for the ArrayLists. Such an amount of memory might be too much, or might be fine. It all depends on the memory you have in your JVM. If you can’t hold everything in memory, consider reading files as needed, or store the data in a database.

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

Sidebar

Related Questions

So, I'm working on a mapping application. In the app there are these toolbars
I'm working on a java project full of Hibernate (3.3.1) mapping files that have
I am working on an MKMapView based iPhone / iPad mapping app that overlays
I am working on key mapping. The problem is that when I press the
I am working on a mapping application and need to display the data objects
My question is about a school project that I'm working on. It involves mapping
While working on a mapping structure for our applications we ran into some trouble
I'm working with the criteria API, querying against a mapping file that I cannot
I'm working on a WinForm application. I've implemented data-access logic into a library project
I have a HasMany mapping that needs a condition. I have this partially working,

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.