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/21 18:07:55 UTC

XSSFCellStyle method seems to be slow

Hi everybody !!

I'm currently using apache POI to automatically tranfers data from xls file
to xlsm file after some process. I have strong executing time constraint and
the setters on XSSFCellStyle is very time consuming. 

In fact i have files with thousands of cell to transfert and method on boder
(SetBorder & SetBorder color) take 3 ms to 5 ms to execution each on 1 cell.
In my context 1300 thousands it takes 30 sec to execute.

<http://apache-poi.1045710.n5.nabble.com/file/n5715024/XSSFCellStyle_slow.png> 
In this graph, we can see the most time spend on these methods is in state
"waiting". 


Is it normal for you or not ?

Thanks a lot!!



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/XSSFCellStyle-method-seems-to-be-slow-tp5715024.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: XSSFCellStyle method seems to be slow

Posted by alefevre <al...@soprabanking.com>.
So i need to rework my algorithm. 




--
View this message in context: http://apache-poi.1045710.n5.nabble.com/XSSFCellStyle-method-seems-to-be-slow-tp5715024p5715034.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: XSSFCellStyle method seems to be slow

Posted by Nick Burch <ap...@gagravarr.org>.
On Fri, 21 Feb 2014, alefevre wrote:
> In fact i have files with thousands of cell to transfert and method on 
> boder (SetBorder & SetBorder color) take 3 ms to 5 ms to execution each 
> on 1 cell. In my context 1300 thousands it takes 30 sec to execute.

Cell Styles are workbook scoped, not cell scoped. You should create the 
ones you need upfront, then apply these to cells. Don't create one style 
per cell!

Nick

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