https://bz.apache.org/bugzilla/show_bug.cgi?id=60325
Bug ID: 60325
Summary: Poor performance in DirectoryNode.createDocument() for
NPOIFSFileSystem
Product: POI
Version: 3.15-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: POIFS
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 34413
--> https://bz.apache.org/bugzilla/attachment.cgi?id=34413&action=edit
Sample project which compares NPOIFSFileSystem and OPOIFSFileSystem
When adding lots of documents entries to the file system the performance of the
NPOIFSFileSystem implementation is ~10x slower than OPOIFSFileSystem.
The attached sample program is often stuck with stacks like this:
at java.nio.Buffer.<init>(Buffer.java:202)
at java.nio.ByteBuffer.<init>(ByteBuffer.java:281)
at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:70)
at java.nio.ByteBuffer.wrap(ByteBuffer.java:373)
at
org.apache.poi.poifs.nio.ByteArrayBackedDataSource.read(ByteArrayBackedDataSource.java:49)
at
org.apache.poi.poifs.filesystem.NPOIFSFileSystem.getBlockAt(NPOIFSFileSystem.java:484)
at
org.apache.poi.poifs.filesystem.NPOIFSStream$StreamBlockByteBufferIterator.next(NPOIFSStream.java:169)
at
org.apache.poi.poifs.filesystem.NPOIFSStream$StreamBlockByteBufferIterator.next(NPOIFSStream.java:142)
at
org.apache.poi.poifs.filesystem.NPOIFSMiniStore.getBlockAt(NPOIFSMiniStore.java:71)
at
org.apache.poi.poifs.filesystem.NPOIFSStream$StreamBlockByteBufferIterator.next(NPOIFSStream.java:169)
at
org.apache.poi.poifs.filesystem.NPOIFSStream$StreamBlockByteBufferIterator.next(NPOIFSStream.java:142)
at
org.apache.poi.poifs.filesystem.NDocumentInputStream.readFully(NDocumentInputStream.java:248)
at
org.apache.poi.poifs.filesystem.NDocumentInputStream.read(NDocumentInputStream.java:150)
at
org.apache.poi.poifs.filesystem.DocumentInputStream.read(DocumentInputStream.java:125)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.skip(BufferedInputStream.java:380)
- locked <0x345> (a java.io.BufferedInputStream)
at
org.apache.poi.poifs.filesystem.NPOIFSDocument.store(NPOIFSDocument.java:126)
at
org.apache.poi.poifs.filesystem.NPOIFSDocument.<init>(NPOIFSDocument.java:84)
at
org.apache.poi.poifs.filesystem.DirectoryNode.createDocument(DirectoryNode.java:422)
at Test.copyAllEntries(Test.java:83)
at Test.copyAllEntries(Test.java:77)
at Test.main(Test.java:49)
This problem crops up while creating MSG files with lots of recipients because
each recipient requires several document entries.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]