Results 1 to 3 of 3
  1. #1
    trust is offline Member
    Join Date
    Jul 2009
    Posts
    9
    Rep Power
    0

    Default Storing and managing huge arrays

    My current aim is to store huge arrays of
    seven different types. I don't not know which type exactly do I need,
    it depends of file type that i'm going to read.
    My idea is to write a class that has seven array. Six of
    them are allways null and one stores my data. But this decision looks
    quite gracelessly...

    So my questions are:

    1. Is there any more elegant way to store my data?

    2. Is arrays sizable for this kind of job? (Storing huge(1
    000 000 elements) arrays)

  2. #2
    coffee is offline Member
    Join Date
    Aug 2009
    Location
    ...
    Posts
    12
    Rep Power
    0

    Default

    1. Use a 2D array and have the 'x' be the array number and the 'y' be the value you would have used for a 1D array.

    2. Yes.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    This is quite an old thread. But I just feel to add something more.

    Actually I don't think it's a good idea to keep that much of data in arrays. Because all those are allocated in your memory. Just think what happen if you have millions of such array elements, because of your single array, since all the others are always null. And also I wonder what's the point just define six more arrays if you are not going to use them.

    In such cases most suitable things is deal with the databases. Indexing, paging and lots of other technologies are available to handle huge databases.

Similar Threads

  1. Huge VB.Net conversion
    By bullstreetboy in forum New To Java
    Replies: 3
    Last Post: 04-09-2009, 02:30 PM
  2. Managing jPanels in jSplitPane
    By calexander in forum Advanced Java
    Replies: 6
    Last Post: 11-13-2008, 08:06 PM
  3. Managing Gigabytes for Java 2.1.1
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 03-01-2008, 11:23 PM
  4. Managing Gigabytes for Java 2.0
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 07-07-2007, 03:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •