...
Wiki Markup |
---|
If the Java Virtual Machine (JVM) interacts with a file system that operates over an unreliable network, file I/O might incur a performance penalty. In such cases, avoid file I/O over the network when holding a lock. File operations (such as logging) that may block waiting for the output stream lock or for I/O to complete may be performed in a dedicated thread to speed up task processing. Logging requests can be added to a queue given that the queue's {{put()}} operation incurs little overhead as compared to file I/O \[[Goetz 06, pg 244|AA. Java References#Goetz 06]\]. |
...