Hi Zach,

'cause you didn't the machine data I assume that you measured 
the times on the same machine.
After you investigated in the direction of file systems (blocksize,
journaling (Reiser, ext3), give your vm a try. Are you using a hot-
spot version. Andy Oliver from the core team wrote about huge
differences in the runtime behaviour of different flavours with SUNs
runtime set as most performant among other (Blackbird etc.).

May be you can tune your Linux enviroment in this area.

cu Stefan

> -----Ursprüngliche Nachricht-----
> Von:  Zach Engel [SMTP:[EMAIL PROTECTED]
> Gesendet am:  Mittwoch, 17. August 2005 21:08
> An:   'POI Users List'
> Betreff:      bad performance in linux
> 
> Hi
> 
> Need some help with the following performance problem:
> 
> I have some code that creates a HSSFWorkBook 
> (about 400 rows of 10 cells each) and then writes it 
> to an output stream (out = HttpServletResponse.getOutputStream())
> 
> This takes 2 seconds on a WINDOWS machine.
> Here is some info from my log
> [17 Aug 2005 18:12:30 DEBUG] - hssf entire write    millis=1908
> [17 Aug 2005 18:12:30 DEBUG] - hssf getbytes        millis=497
> [17 Aug 2005 18:12:30 DEBUG] - hssf createDocument  millis=713
> [17 Aug 2005 18:12:30 DEBUG] - hssf writeFilesystem millis=698
> 
> When I run the same code on a linux machine (Linux 2.4.20-13.7),
> it takes 7-10 seconds.
> Here is some info from my log
> [2005-08-17  19:07:21 DEBUG] - hssf entire write    millis=7051
> [2005-08-17  19:07:21 DEBUG] - hssf getbytes        millis=4441
> [2005-08-17  19:07:21 DEBUG] - hssf createDocument  millis=46
> [2005-08-17  19:07:21 DEBUG] - hssf writeFilesystem millis=2562
> 
> After downloading the most current POI sources, and debugging a little, 
> I discovered that when the getBytes() method (in HSSFWorkbook.write) tries
> to serialize the SSTRecord record, it takes about 4000 milliseconds, 
> While it takes only about 47 milliseconds on windows 
> 
> 
> In addition to that, while investigating the writeFilesystem method, 
> I discovered that most of the time is spent writing block2 
> (indeed shhet2 contains the 400 rows of data)
> 
> From the Linux log:
> [2005-08-17 19:28:02 DEBUG] - hssf writeBlock[1] millis=0
> [2005-08-17 19:28:04 DEBUG] - hssf writeBlock[2] millis=2300
> [2005-08-17 19:28:05 DEBUG] - hssf writeBlock[3] millis=210
> [2005-08-17 19:28:05 DEBUG] - hssf writeBlock[4] millis=0
> [2005-08-17 19:28:05 DEBUG] - hssf writeBlock[5] millis=0
> [2005-08-17 19:28:05 DEBUG] - hssf writeBlock[6] millis=0
> [2005-08-17 19:28:05 DEBUG] - hssf writeBlock[7] millis=0
> [2005-08-17 19:28:05 DEBUG] - hssf writeBlock[8] millis=1
> 
> 
> From the WINDOWS log:
> [17 Aug 2005 18:33:31 DEBUG] - hssf writeBlock[1] millis=0
> [17 Aug 2005 18:33:32 DEBUG] - hssf writeBlock[2] millis=1807
> [17 Aug 2005 18:33:32 DEBUG] - hssf writeBlock[3] millis=0
> [17 Aug 2005 18:33:32 DEBUG] - hssf writeBlock[4] millis=0
> [17 Aug 2005 18:33:32 DEBUG] - hssf writeBlock[5] millis=0
> [17 Aug 2005 18:33:32 DEBUG] - hssf writeBlock[6] millis=0
> [17 Aug 2005 18:33:32 DEBUG] - hssf writeBlock[7] millis=0
> [17 Aug 2005 18:33:32 DEBUG] - hssf writeBlock[8] millis=0
> 
> 
> 
> 
> 
> 
> One last thing regarding the LANG environment variable:
> While looking for answers on the web I noticed there have been some issues
> with encoding settings.
> My LANG on the linux is set to en_US.UTF8
> I changed it to ISO-8859-1, and then ran the tomcat, 
> but the results where the same.
> 
> I hope you can offer some kind of explanation to the wide difference
> between
> the 2 environments.
> 
> Thank you
> 
> Zach Engel
> Check Point
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to