• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Manipulating large file containing key value pairs

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic