You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by alefevre <al...@soprabanking.com> on 2014/02/11 15:26:14 UTC

WookbookFactory and XSSFWorkbook very slow with some file (POI 3.9)

Hi all,

Currently I'm working with apache POI in 3.9 version (can't use upper
version for the moment).
With this code :

        String path = getFilePath();
        FileInputStream fis = new FileInputStream(path);
        Workbook wbk = WorkbookFactory.create(fis);
        return wbk;

I observe the creation of workbook is VERY slow for a xlsm file. When I try
with XSSFWorkbook the problem is the same.
The file is not especially big (260 Ko) and the performance are 50 worst
than an xls file.

This code is execute on local JVM, not in server context.

I already saw this issue on mailing list but I don't find solution for me. 
In my program will open dozen and dozen XLSM file and the program have
performance constraints so in need to have an optimize this. Do you have a
solution?

NB : I just try to set parameters to my JVM with more memory but it don't
have any effect

Thanks for your answer.
Best regards,
Alexandre Lefèvre



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/WookbookFactory-and-XSSFWorkbook-very-slow-with-some-file-POI-3-9-tp5714902.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: WookbookFactory and XSSFWorkbook very slow with some file (POI 3.9)

Posted by alefevre <al...@soprabanking.com>.
I'm waiting between 5 and 10 sec each time I open a  "xlsm" file (250Ko), I
think it is not the Bug #51585 which is a real hangs of hours.

The 5 or 10 sec are they normal ?

NB : For information a xls file (200ko) just get 0.1 sec to open in average. 

Thanks for advice, I will use file to have better memory performance.



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/WookbookFactory-and-XSSFWorkbook-very-slow-with-some-file-POI-3-9-tp5714902p5714908.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: WookbookFactory and XSSFWorkbook very slow with some file (POI 3.9)

Posted by kiwiwings <an...@gmx.de>.
alefevre wrote
> ... (can't use upper version for the moment).

Please make sure in a standalone test with POI 3.10-final, that your aren't
affected by Bug #51585
https://issues.apache.org/bugzilla/show_bug.cgi?id=51585

Andi



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/WookbookFactory-and-XSSFWorkbook-very-slow-with-some-file-POI-3-9-tp5714902p5714903.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: WookbookFactory and XSSFWorkbook very slow with some file (POI 3.9)

Posted by Nick Burch <ap...@gagravarr.org>.
On Tue, 11 Feb 2014, alefevre wrote:
> With this code :
>
>        String path = getFilePath();
>        FileInputStream fis = new FileInputStream(path);
>        Workbook wbk = WorkbookFactory.create(fis);
>        return wbk;

See http://poi.apache.org/spreadsheet/quick-guide.html#FileInputStream - 
you should be creating directly from the File, not forcing it to be 
buffered via an InputStream

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org