09 November, 2014

String allocates in memory at least (24+20+N*2) bytes, where N - number of characters in the string.
If N=10 then string size = 64 bytes.

One million of these strings = 64 000 000 bytes. But also we need array or collection to store these strings.
This requires additional memory.
ArrayList<String>(1 000 000) ~= 4 000 000 bytes (4 bytes per reference to string object).

01 November, 2014

Some companies (banks, medical and pharmaceutical companies) store their data in the SAS (.sas7bdat) format. This is old, legacy, but still actual format for tabular data. And this format is proprietary and fiddly.

But what if you have to work with the data from the sas-file? For me, solution is pretty simple - convert the data from the sas-file to some convenient and popular format. For example, to the MongoDB. And then access this data via nice query-like API.

In my new mini-project sas2mongo I show how to convert data from the sas-file into the MongoDB in Java.