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

  • Home
  • SEARCH
  • 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 7612131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:49:59+00:00 2026-05-31T01:49:59+00:00

I implemented a program about calculating the stock values comparing that value in the

  • 0

I implemented a program about calculating the stock values comparing that value in the given times’ values and etc..
I have a csv file which has all dates and double values. In my program for every single date, I’m openning a file, parsing and searching the value of the given date. And I may check the date for multiple times. That’s why I want to use these values in the HashMap, if I don’t have the value of the given date as a Key, I would open the csv file and search it.
But before implementing that program, I want to check that if I store all values in the hashmap, is it fit into the java’s heap which is 8MB.
My csv file has 1200 lines of date and corresponding double value.
Is there any way to understand it before implementing the code ?
Or do you advise any better ideas to make more efficient program ?

Thanks.

  • 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-31T01:50:00+00:00Added an answer on May 31, 2026 at 1:50 am

    Loading this data into a hashmap is orders of magnitude more efficient than reading from files constantly. There is no one hard and fast rule on determining how much heap space will be taken up by parsing and loading a given csv file. It depends on the system architecture, string encodings used, data types, etc.

    The simplest and best approach is to run a simple JVM profiler and examine the difference in heap usage from just before and just after you load a particular sized file into a hashmap.

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

Sidebar

Related Questions

I have a program that is been implemented in C++ which I now want
I implemented in python a program that builds some db from protein fasta file.
I found an interesting bug in a program that I implemented somewhat lazily, and
I have implemented custom draw for an CTreeCtrl in my MFC Smart Device program.
I have some questions about android ui api. Give a example, that I want
I have a C++ program calling an interface I've implemented in C#. I'm consistently
All, I have Core Data implemented in my program to store customer information. Let's
I have written a program that relies on a proxy to function. I now
I want to have a Singleton that will be auto instantiated on program start.
My program updates several hundred objects stored in an ArrayList about one hundred times

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.