• Post Reply Bookmark Topic Watch Topic
  • New Topic

Manipulating large file containing key value pairs

 
Sheenu Pillai
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a very large file which contains data with the below format
key=value1,value2
key_value1=somedata1$somedata2
....
I cannot use database (like Oracle/Access etc.) but I could have a different file type like .xls etc. (this might change the data format, but it is ok). Can some one suggest me an efficient way to read and manipulate the file (like update, delete).
Right now I use Properties.load to load the file into memory and manipulate it but I don't think it is the efficient way. Any suggestions will be very helpful.
Thanks,
Srini
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd stick with the simplest thing that runs until some serious performance analysis proved to me that it was too slow. Sometimes a class just looks funny to you and it kinda eats on you that maybe you should use something bettter, but guessing what is fast and slow before you really make it run is a not your best use of time. Code for human readers first!
To improve your comfort level, try to hold the number of classes that know you are using properties down to exactly one. Then if properties turns out to be a dog in real performance analysis, you can replace it without affecting any of the rest of your program.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!