This takes about 2 seconds to process 22 MTexts
foreach (MText mt in MText)
{
foreach (KeyValuePair<string,string> pair in DrawingNumbers.List)
{
mt.Contents = mt.Contents.Replace(pair.Key, pair.Value);
}
}
This takes about a minute to process 22 MLeaders.
foreach (MLeader ml in Multileaders)
{
MText mt = ml.MText;
foreach (KeyValuePair<string, string> pair in DrawingNumbers.List)
{
mt.Contents = mt.Contents.Replace(pair.Key,pair.Value);
ml.MText = mt;
}
}
If I take out the ml.MText = mt; it reduces back to 2 seconds (but my text won't change)
Does anyone know what's causing this?