New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use xtext string interning for low memory devices #1859
Conversation
Thanks for raising. |
This change could be applied to all memory sizes, but this change is using less memory by using more cpu. When alot of memory is available there is no need to have this enabled. |
cpu is absolutely not an issue with OH, mem almost always is. Note on openHABian there's usually more programs running to use RAM (e.g. nodejs), and there's swapping/paging to be avoided (even more so if no ZRAM) with all sizes. WRT Zulu, all flags must work with all JDKs or at least get ignored by those that don't support an option. Please check JVM version before adding. EDIT plus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please test with the full range of Java opts I gave in my (edited) comment
and change this PR to include them all, if applicable for all mem sizes.
does that thumb-up mean you will be testing & updating the PR ? |
Yes, but testing might take some time to see if it is working and not just starting with these flags. |
When all these flags set i have issues calling a graph with one year history, the 4 cores of my raspi 3a stuck at 100% and 60°C for ~4 minutes. I will try some other settings to fix this. |
Ok please remember to double check i.e. if if is a) reproduceable and b) does not occur without those option. |
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net>
@mstormi i have updated the PR, some flags had no ( The negative impact was reproducible and resulted probably from the overhead by releasing and acquiring the memory to aggressive. |
Thanks. Did you exclusively test on a 1GB box i.e. RPi 3A ? |
Yes, but it is a 512 MB box with zram (zstd, 280%). |
This PR will enable xtext string interning for low memory devices to get rid of a lot Strings.
For my system this will reduce the number of strings inside a memory dump by ~50%.
https://github.com/eclipse/xtext/blob/main/org.eclipse.xtext/src/org/eclipse/xtext/naming/QualifiedName.java#L130-L137