StringBuilder default constructor in the class library (original) (raw)
Hamada Abdelaziz hamada.kenai at gmail.com
Thu Dec 14 17:03:32 UTC 2017
- Previous message: [10] RFR: 8193507: [REDO] Startup regression due to JDK-8185582
- Next message: StringBuilder default constructor in the class library
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
While analyzing GC pressure of a run time, I noticed the top object being a char[], upon a closer inspection, it turns out to be a result of ObjectStreamClass use of StringBuilder, which is constructed with the default size of 16 bytes. In such case 16 bytes is not a sufficient size, which leads to unnecessary garbage and incurs a performance hit.
In a high volume situation this leads to high GC pressure, and in turn, non uniform performance.
It's worthwhile revisiting all uses of StringBuilder default constructor in the class library and adjusting it appropriately.
Thoughts?
- Previous message: [10] RFR: 8193507: [REDO] Startup regression due to JDK-8185582
- Next message: StringBuilder default constructor in the class library
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]