Skip to Content
Java Projects - Second Edition
book

Java Projects - Second Edition

by Peter Verhas
August 2018
Intermediate to advanced
524 pages
14h 45m
English
Packt Publishing
Content preview from Java Projects - Second Edition

Performance

The second reason for using a logging framework is performance. Although it is not good to optimize for performance before we profile the code (premature optimization), using a methodology that is known to be slow and inserting several lines into our performance-critical code, invoking slow methods is not really professional either. Using a well-established, highly optimized framework in a way that is an industry best practice should not be questionable.

Using System.out.println() sends the message to a stream and returns only when the IO operation is done. Using real logging handles the information to the logger and lets the logger do the logging asynchronously, and it does not wait for completion.

It is really a drawback that ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java 11 Cookbook - Second Edition

Java 11 Cookbook - Second Edition

Nick Samoylov, Mohamed Sanaulla

Publisher Resources

ISBN: 9781789131895Supplemental Content