On Wed, 7 Dec 2011, Jim Talbut wrote:
I'm trying to optimise my POI-calling code and jProfiler is telling me that adding borders to styles is quite a few orders of magnitude slower than setting other properties on a style.
i.e.:
XSSFCellStyle.setBottomBorderColor - Calls: 6, Total time 141ms.
XSSFCellStyle.setFont - Calls: 14, Total time 403us.

Is there any obvious reason why borders are so much slower?

Borders aren't stored directly on the cell style. Instead, they get put elsewhere in the styles table, and are referenced by index in the cell style.

It's possible that the code for working with the borders isn't as optimised as it could be, so I'd suggest you try profiling into the border code and see if you can spot what is taking the time. Once we know that, it might be possible to tweak things (either code paths or data structures) to help

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to