We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Performance issue while Placing Cells into Aspose Table


We are facing performance issue from your Aspose Slides API while placing the more cells in single slide

For example,

The time consuming has been taken to place 50 cells in single slide and another 50 cells in another single slide is less than to place 100 cells in one single slide.

Please let us know whether this is the known performance issue from Aspose end and if so ,is there any way to resolve this issue.i have given below about the over all flow in our design to generate the PPT slide.

We are using following methods from Aspose slides Table to fix the cell into PPT table.

Cell = pptTable.GetCell() and Cell = pptTable.MergeCells(). this "Cell' is Aspose.Slides.Cell.

After getting the cell, we are using the TextFrame , Paragraph ,Portion to place the text into that cell.

Please let me know if you need more information.



Hi Priya,

Thanks for your interest in Aspose.Slides.

I have tried to reproduce the problem as specified by you but unfortunately unable to do so. Can you please share your code snippet that is causing performance issue? For your reference, please verify the code snippet that I have used and it does not create any significant performance issues.

//Instantiate a Presentation object that represents a PPT file
string ST = GetTimestamp(DateTime.Now);//Setting start time
Presentation pres = new Presentation();

//Setting table parameters
int xPosition = 880;
int yPosition = 1400;
int tableWidth = 4000;
int tableHeight = 500;
int columns = 10;//Please change this value to 5 when testing for 50 cells per slide
int rows = 10;
double borderWidth = 2;
int SlidesToGenerate = 2;//Please change this value to 1 when testing for 100 cells slode

//and to 2 when testing for 50, 50 cells 2 slides
    //Accessing the text frame of the first cell of the first row in the table
    Slide slide;
    Aspose.Slides.Table table;

    for (int slid_count = 1; slid_count <= SlidesToGenerate; slid_count++)
        slide = null;
        slide = pres.AddEmptySlide();

        table = null;
        table = slide.Shapes.AddTable(xPosition, yPosition, tableWidth, tableHeight,
            columns, rows, borderWidth, Color.Blue);

        table.AlternativeText = "myTable " + slid_count;

        for (int row = 0; row < rows; row++)
            for (int col = 0; col < columns; col++)
                TextFrame tf = table.GetCell(col, row).TextFrame;
                if (tf != null)
                    tf.Paragraphs[0].Portions[0].Text = "This is row: " + row + " col: " + col;

    //Writing the presentation as a PPT file

    string ST2 = GetTimestamp(DateTime.Now);//End time

    long Difference = Convert.ToInt64(ST2) - Convert.ToInt64(ST);


Thanks and Regards,