https://issues.apache.org/bugzilla/show_bug.cgi?id=52086

--- Comment #2 from Yegor Kozlov <ye...@dinom.ru> 2012-01-14 13:18:28 UTC ---
Finally I had time to review this patch, thanks for your patience. 

I made a small change to initialize the useFasterWrite from a system property:

private static final boolean useFasterWrite =
Boolean.getBoolean("org.apache.poi.sstFastWrite");

this way I can test both modes without re-compiling the code. 

The patch does improve performance but not that much as in your tests. In the
best case I got 25% faster which is far from "2~4x performance improvement"
observed by you. 

In my tests I ran TestSSTRecord#testSSTRecordPerformance() three times in two
sets, either with org.apache.poi.sstFastWrite=true or
org.apache.poi.sstFastWrite=false.

Below is the console output:

-Dorg.apache.poi.sstFastWrite=true
serializer    Memory     time    0.328    +-    0.003    secs
serializer    Memory     time    0.302    +-    0.004    secs
serializer    Memory     time    0.319    +-    0.001    secs

-Dorg.apache.poi.sstFastWrite=false
serializer    Memory     time    0.381    +-    0.002    secs
serializer    Memory     time    0.364    +-    0.004    secs
serializer    Memory     time    0.379    +-    0.001    secs


My test environment:

java: oracle jdk 1.6.0_29 64 bit
option: -Xmx1224m -server
cpu: Intel core i5-2400
OS: windows 7 64bit, 8GB RAM
size of SST: 1<<20
serializer function: Memory

If the performance gain is only 25% then I would stay with current code and not
made such big changes. 
Also, can you provide some high-level tests that show how performance improves
when saving real .xls files. How much does SST serialization take from the
total time spent in workbook.write() ?  


Regards,
Yegor

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to