Results 1 to 3 of 3
Thread: Storing and managing huge arrays
- 08-03-2009, 10:47 AM #1
Member
- Join Date
- Jul 2009
- Posts
- 9
- Rep Power
- 0
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)
- 08-04-2009, 01:52 PM #2
Member
- Join Date
- Aug 2009
- Location
- ...
- Posts
- 12
- Rep Power
- 0
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.
- 08-22-2009, 02:47 PM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
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
-
Huge VB.Net conversion
By bullstreetboy in forum New To JavaReplies: 3Last Post: 04-09-2009, 01:30 PM -
Managing jPanels in jSplitPane
By calexander in forum Advanced JavaReplies: 6Last Post: 11-13-2008, 07:06 PM -
Managing Gigabytes for Java 2.1.1
By JavaBean in forum Java SoftwareReplies: 0Last Post: 03-01-2008, 10:23 PM -
Managing Gigabytes for Java 2.0
By JavaBean in forum Java SoftwareReplies: 0Last Post: 07-07-2007, 02:27 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks