Hello!
I am filling table with some custom function (we canot use mail merge, because of the old templates with formfields and inserted rows are different types - first row can be some item information with 5 cells, second can be description,…)
I store my diffrent types of row in a hashtable “allRows”. One row contains one or more Cells which can contain some text and one or more formfields. I populate my table like this:
Row rowTmp = (Row)allRows[((string)element["ROWTYPE"])]; //not important -> fast, gets an origirinal row from hashtable
Row newRow = (Row)rowTmp.Clone(true); //SLOW!
newRow = updateDataInRow(newRow, element);
tableTemp.InsertAfter(newRow, (Node)tablesStartNodes[tableKey]); //tablesStartNodes…where i insert
Can I speed up Clone function, by some work arround? The problem is, that time complexity is not linear. When i create table with 500 or 800 rows, it works fine (two seconds or a bit more) but when i create document with 2000 or 3000 elements parsing becomes painfuly slow (could be a minute or more) and Clone function takes more and more percent of all the CPU time.