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

17
LINES

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

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

Libraryless. Click here for Pure Java version (2051L/14K/48K).

1  
!7
2  
3  
p {
4  
  S s = javaxDefaultVMArgs(), old = s;
5  
  print("Default VM Args: " + quote(s));
6  
  s = s.replaceAll("-XX:MaxHeapFreeRatio=\\d+", "");
7  
  s = s.replaceAll("-XX:MinHeapFreeRatio=\\d+", "");
8  
  s = trim(s);
9  
  s = trim(s + " -XX:MaxHeapFreeRatio=20 -XX:MinHeapFreeRatio=10");
10  
  if (!s.contains("-XX:+UseG1GC")) s = trim(s + " -XX:+UseG1GC");
11  
  if (!s.contains("-XX:+UseStringDeduplication"))
12  
    s = trim(s + " -XX:+UseStringDeduplication");
13  
  if (neq(old, s))
14  
    setDefaultVMArgs(s);
15  
  else
16  
    print("Keeping.");
17  
}

Author comment

Began life as a copy of #1006272

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1008034
Snippet name: Set Global JavaX Option: Even Smaller Heap (G1, 10-20% slack, string deduplication)
Eternal ID of this version: #1008034/8
Text MD5: 08e352bc135921bfab59c8be5ba29c6e
Transpilation MD5: 9df72af4ac725a901ba7725de95f9630
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-14 00:38:08
Source code size: 534 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 476 / 603
Version history: 7 change(s)
Referenced in: [show references]