facebookarchive / nailgun

Nailgun is a client, protocol, and server for running Java programs from the command line without incurring the JVM startup overhead.
https://github.com/facebook/nailgun
Other
731 stars 138 forks source link

Replace StringBuffer by StringBuilder #192

Closed mrk-andreev closed 4 years ago

mrk-andreev commented 4 years ago

Synchronized classes Vector, Hashtable, Stack and StringBuffer should not be used

Early classes of the Java API, such as Vector, Hashtable and StringBuffer, were synchronized to make them thread-safe. Unfortunately, synchronization has a big negative impact on performance, even when using these collections from a single thread.

It is better to use their new unsynchronized replacements: