Issue #36 resolved

Huge performance issue with debug logging enabled

Christian Schudt
created an issue

Hi,

I've seen performance problems when adding a lot of rows. It then turned out, that this is caused by the logging output (debug level).

With one row, there's only this:

org.jxls.area.XlsArea - Applying XlsArea at Template!A4 with Context{util=org.jxls.transform.poi.PoiUtil@10ee7e5, messages=[SomeClass@19b2141], message=SomeClass@19b2141}

With two rows, there are two rows like that:

org.jxls.area.XlsArea - Applying XlsArea at Template!A4 with Context{util=org.jxls.transform.poi.PoiUtil@10ee7e5, messages=[SomeClass@19b2141, SomeClass@47d8ae], message=SomeClass@19b2141}
org.jxls.area.XlsArea - Applying XlsArea at Template!A5 with Context{util=org.jxls.transform.poi.PoiUtil@10ee7e5, messages=[SomeClass@19b2141, SomeClass@47d8ae], message=SomeClass@47d8ae}
org.jxls.area.XlsArea - Applying XlsArea at Template!A4 with Context{util=org.jxls.transform.poi.PoiUtil@10ee7e5, messages=[SomeClass@19b2141, SomeClass@47d8ae, SomeClass@974e45], message=SomeClass@19b2141}
org.jxls.area.XlsArea - Applying XlsArea at Template!A5 with Context{util=org.jxls.transform.poi.PoiUtil@10ee7e5, messages=[SomeClass@19b2141, SomeClass@47d8ae, SomeClass@974e45], message=SomeClass@47d8ae}
org.jxls.area.XlsArea - Applying XlsArea at Template!A6 with Context{util=org.jxls.transform.poi.PoiUtil@10ee7e5, messages=[SomeClass@19b2141, SomeClass@47d8ae, SomeClass@974e45], message=SomeClass@974e45}

Please notice that in each line, the whole collection is logged out, so the performance decreases exponentially.

With 4 rows, you have approximately 16, with 10 rows you have 100, with 1000 rows you have 1.000.000 factor of bytes being logged out.

1000 rows take several seconds to finish the excel file, 10.000 rows takes probably minutes (didn't let it finish, but it's slow).

Note, this is only with debug log output.

Maybe consider to remove logging out the whole collection.

Comments (1)

  1. Log in to comment