What's the difference of using a POIFSFileSystem object in the constructor
instead of a InputStream object?


Regards,
Daniel


-----Original Message-----
From: Srinadh Karumuri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 07 April, 2004 1:05 AM
To: POI Users List
Subject: Re: Regarding HSSF Optimization


I am not sure why it's slow. Maybe someone can help you there.

Here is what I do (same as in the examples):
         POIFSFileSystem fs =
         new POIFSFileSystem(new FileInputStream(_templateFile));
         wb = new HSSFWorkbook(fs);

At 09:11 AM 4/6/2004, you wrote:
>Hi all,
>
>Just curious about one thing, why constructor of the work book
>is taking maximum time to create itself?
>
>Say for example if i wanted to parse 1 MB file which contains
>only text, it is taking arround 45 seconds on 256MB/P4 macahine
>for creating constructor itself, after that more 30 to 35 secs
>approx for getting the text from HSSFSheet Objects
>
>This is becoming problem for me when deal with large documents.
>
>
>
>here is how i am construction the workbook object
>
>
>     //EXCEL DOCUMENT AS INPUT STREAM OBJECT
>     InputStream input = new FileInputStream(strDocument);
>     //HOLDS THE EXCEL BUFFER
>     ByteArrayOutputStream excelBuffer = new
>ByteArrayOutputStream();
>
>     HSSFWorkbook workbook = null;
>     //CREATE A WORKBOOK FOR AN EXCEL DOCUMENT
>     workbook = new HSSFWorkbook(input);
>
>
>=====
>"No one can earn a million dollars honestly."- William Jennings Bryan
>(1860-1925)
>
>"Make everything as simple as possible, but not simpler."- Albert Einstein
>(1879-1955)
>
>"It is dangerous to be sincere unless you are also stupid."- George
>Bernard Shaw (1856-1950)
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Small Business $15K Web Design Giveaway
>http://promotions.yahoo.com/design_giveaway/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to