Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

18
LINES

< > BotCompany Repo | #1011264 // Set Global JavaX Option: Even Smaller Heap (G1, 10-20% slack, string deduplication) + Server VM

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (4030L/25K/89K).

!7

p {
  S s = javaxDefaultVMArgs(), old = s;
  print("Default VM Args: " + quote(s));
  s = s.replaceAll("-XX:MaxHeapFreeRatio=\\d+", "");
  s = s.replaceAll("-XX:MinHeapFreeRatio=\\d+", "");
  s = trim(s);
  s = trim(s + " -XX:MaxHeapFreeRatio=20 -XX:MinHeapFreeRatio=10");
  if (!s.contains("-server")) s = trim("-server " + s);
  if (!s.contains("-XX:+UseG1GC")) s = trim(s + " -XX:+UseG1GC");
  if (!s.contains("-XX:+UseStringDeduplication"))
    s = trim(s + " -XX:+UseStringDeduplication");
  if (neq(old, s))
    setDefaultVMArgs(s);
  else
    print("Keeping.");
}

Author comment

Began life as a copy of #1008034

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, ppjhyzlbdabe, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1011264
Snippet name: Set Global JavaX Option: Even Smaller Heap (G1, 10-20% slack, string deduplication) + Server VM
Eternal ID of this version: #1011264/3
Text MD5: 5cffa669d5e5fb9ee1e7b819836f530c
Transpilation MD5: b7d458b7a6e72fb62efc7065397199e2
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-21 21:46:00
Source code size: 591 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 469 / 576
Version history: 2 change(s)
Referenced in: #1011289 - Add "Headless" to Global JavaX Options