I am not really family with SDBM so here is a simple question I want to ask:
How to modify some constants in Sdbm inorder to save some diskspace while not sacrifacing too much performance?
In my case, a 4mb plain text properties file has been converted to sdbm but the size is now more than 8mb, which is simple not acceptable(Yes, the file is important, it plays an important role in my app, but the app is only about 100k)
My goal is to shrink its size to about 5-6 mb, is it possible? Will there be a serious performance degrade?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can modify org.solinger.sdbm.Sdbm.PBLKSIZ to a smaller constant. The default is 1024 which means that 1024 bytes will be allocated for each key/value pair, so if you know that your key/value pairs will never be larger than 500 bytes total then you can just change that constant you should should see the savings you are looking for in your database size.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am not really family with SDBM so here is a simple question I want to ask:
How to modify some constants in Sdbm inorder to save some diskspace while not sacrifacing too much performance?
In my case, a 4mb plain text properties file has been converted to sdbm but the size is now more than 8mb, which is simple not acceptable(Yes, the file is important, it plays an important role in my app, but the app is only about 100k)
My goal is to shrink its size to about 5-6 mb, is it possible? Will there be a serious performance degrade?
You can modify org.solinger.sdbm.Sdbm.PBLKSIZ to a smaller constant. The default is 1024 which means that 1024 bytes will be allocated for each key/value pair, so if you know that your key/value pairs will never be larger than 500 bytes total then you can just change that constant you should should see the savings you are looking for in your database size.