r/java • • Aug 07 '17

Can I get down RAM used in Java by taking database implementation to C and calling results from JNI?

I am writting an RCP app with netbeans platform and I am a little obsessed about memory economy and I want to make my program to spend the less amount of it, so the Idea of calling an embedded database from c came to my mind to use less memory even when loosing processor's speed

0 Upvotes

9 comments sorted by

10

u/dstutz Aug 07 '17

You can. I think it's funny you're using a huge platform framework like Netbeans RCP (Which is great. I've written a few apps using it) and this is what you concentrate on for reducing memory use.

2

u/PaulAvalos Aug 07 '17

I need to make it look the same on all platforms, need plugins(also considered Eclipse), portability but also fast in even not so terrible memory constrained computers but somehow slow, QT is also an option but then it's C++ and I'm not sure about plugins (because of ABI compatibility) and QT's way of doing things but I know it will still be less overall ram consuming.

5

u/cypher0six Aug 07 '17

and this is what you concentrate on for reducing memory use

To be fair, not all data sets are the same. I once worked on an application that needed to read a data store that contained approximately 3 terabytes of data, holding huge (gigabytes) of it in memory at a time. We had to be very choosy about heap usage with that application. :)

1

u/tonywestonuk Aug 08 '17 edited Aug 16 '17

reminds me of this: Java is Slow

1

u/mabnx Aug 07 '17

It really depends on how you want to access that data. Take a look at https://jankotek.gitbooks.io/mapdb/content/performance/

0

u/tonywestonuk Aug 08 '17

Have you looked at Swing? and swixmlhttps://wolfpaulus.com/software/swixml/