3 ms·
I want to use JavaFX to develop cross-platform apps but I feel JVM uses too much memory even for little things. It's been a while since I've used Java to progr
by generichuman 9y ago
I want to use JavaFX to develop cross-platform apps but I feel JVM uses too much memory even for little things.
It's been a while since I've used Java to program, has the memory situation changed? or are there any other solutions for lowering the JVM memory usage?
- slackingoff2017 9y agoJava will use as much memory as you give it. Higher heap size is better for performance up to around 32GB. For most Java apps you can limit heap to 256M or less with little consequence. AFAIK Java uses less ram than Python and JavaScript, only common languages that beat it are Golang and C/C++
- nextos 9y agoAnd memory used will be hopefully quite lower with value types, coming sometime in the future: http://www.jesperdj.com/2015/10/04/project-valhalla-value-types/ http://www.jesperdj.com/2015/10/04/project-valhalla-value-ty...
- vbezhenar 9y agoI used Swing Java applications on a computer with 512 MB RAM. Sure, Java eats more than C++, but it should be pretty in line with JavaScript which is a very popular choice nowadays.
- jm547ster 9y agoDefault heap size is over-generous in most JVM implementations, experimenting with smaller settings is the solution.
- pjmlp 9y agoApparently lack of memory isn't something that affects Electron popularity. Java applications use much less memory, unless their coders weren't paying attention during algorithms and datastructures lectures.