Java Performance Tuning
Java(TM) - see bottom of page
Our valued sponsors who help make this site possible
JProfiler: Get rid of your performance problems and memory leaks!
Training online: Concurrency, Threading, GC, Advanced Java and more ...
Tips August 2021
JProfiler
|
Get rid of your performance problems and memory leaks!
|
JProfiler
|
Get rid of your performance problems and memory leaks!
|
|
|
Back to newsletter 249 contents
https://openjdk.java.net/jeps/290
Filter Incoming Serialization Data(Page last updated May 2021, Added 2021-08-29, Author Roger Riggs, Publisher OpenJDK). Tips:
- Use property "jdk.serialFilter" to specify classes that can be deserialized, and the size limits allowed, eg jdk.serialFilter=!example.somepackage.SomeClass;example.somepackage.*;!*; maxarray=1000;maxdepth=10;maxrefs=30;maxbytes=100000 would allow only classes in example.somepackage to be deserialized, except for example.somepackage.SomeClass, and in addition would not allow an object to be deserialized if it exceeded any of the limits (eg more than 100 000 bytes).
https://bugs.openjdk.java.net/browse/JDK-8267077
Unified Logging Supports Asynchronous Log Flushing(Page last updated August 2021, Added 2021-08-29, Author David Holmes, Publisher OpenJDK). Tips:
- To enable asynchronous logging of the JVM logs, use -Xlog:async and if you need to configure the logging buffer size, use eg -XX:AsyncLogBufferSize=1M (there is a dedicated thread for flushing the buffer).
https://openjdk.java.net/jeps/415
Context-Specific Deserialization Filters(Page last updated August 2021, Added 2021-08-29, Author Roger Riggs, Publisher OpenJDK). Tips:
- A global deserialization filter can be set with the property "jdk.serialFilter". This JEP enables context specific deserialization filters to be used. Essentially you would create a filter
filter = ObjectInputFilter.Config.createFilter(...)
then before you read in any object with your ObjectInputStream instance, you would first call ois.setObjectInputFilter(filter)
.
Jack Shirazi
Back to newsletter 249 contents
Last Updated: 2024-12-27
Copyright © 2000-2024 Fasterj.com. All Rights Reserved.
All trademarks and registered trademarks appearing on JavaPerformanceTuning.com are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. JavaPerformanceTuning.com is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
URL: http://www.JavaPerformanceTuning.com/news/newtips249.shtml
RSS Feed: http://www.JavaPerformanceTuning.com/newsletters.rss
Trouble with this page? Please contact us