I am having performance problems using Table.setColumnWidth() method.
Our customer have Presentations with about 20 slides each. Each slide has a table of 50 rows and 7 to 9 columns. Here is the timing for a single table with 50 rows and 9 columns:
elapsed time: 45.616 seconds memory usage: 4472kb
Just for testing I tried a table with 100 rows and 9 columns, here is the results:
elapsed time: 287.193 seconds memory usage: 8159kb
Is there anything you can do to improve the performance of setColumnWidth method. Waiting more than 10 minutes to create 20 slides is too slow.
Note: using the default column width does not degrade performance - the 9x50 table takes 2.413 seconds only.
Here the test code with 50 rows and 9 columns:
Slide slide = templatePres.getSlideByPosition(1); Shapes shapes = slide.getShapes(); Table t = shapes.addTable(10, 576, 10*576, 8*576, 9, 50); for(int i=0; i<50;i++) t.setrowheight(i, 96); for(int i=0 i<9; i++) t.setcolumnwidth(i, 576);