E
Ergun
I have a VBA/Word application written under .NET framework 1.1 accessing
Microsoft Word 9.0 Object Library through COM interoperobility layer. This
application performed well until Windows XP Service Pack 2 is installed. Now
it performs poorly and nearly 8-10 X slower accross all Word calls. That is,
not just one particular function call through COM interoperob is slower, but
seems like ALL Word functions are running much slower consistently (this has
been proved with intensive tracing). In a nutshell the application renders
tables and colorizes rows or cells using code like:
Word._Document doc = (Word._Document)rc.Document;
Word.Range range = (Word.Range)rc.Range.Range;
Word.Table wt = null;
wt = range.ConvertToTable(
ref seperator,
ref numrows,
ref numcols,
ref initialcolwidth,
ref format,
ref applyBorders, // Apply borders
ref applyShading, // Apply Shading
ref applyFont, // Apply Font
ref applyColor, // Apply Color
ref applyHeading, // Apply Heading Rows
ref falseVal, // Apply Last Row
ref falseVal, // Apply First Column
ref falseVal, // Apply Last Column
ref falseVal, // AutoFit
ref afitbvor, // AutoFit Behaviour
ref tabbvor ); // Default Table Behaviour
wt.Select();
Word.Selection sel = doc.Application.Selection;
sel.Tables.Item(1).Cell( 1, 1).Select();
sel.SelectRow();
sel.Cells.Shading.BackgroundPatternColor = (Word.WdColor)par.Color;
Great care was spent to make the code efficient using word table rendering
techniques given in MVP site :
(http://word.mvps.org/FAQs/TblsFldsFms/FastTables.htm).
Stopping disabling the Virus check program or various other services by
elimination didn't make any difference.
I suspect .NET Framework SP 1 which came with KB867460 (and which is now
included in Windows XP Service Pack 2) could also have played part in this.
My hunch is something to do with a combination of COM Interoperob layer and
additional security checks/fixes introduced in the service pack causing
perhaps dubious retries or timeouts somewhere.
Thanks in advance..
Microsoft Word 9.0 Object Library through COM interoperobility layer. This
application performed well until Windows XP Service Pack 2 is installed. Now
it performs poorly and nearly 8-10 X slower accross all Word calls. That is,
not just one particular function call through COM interoperob is slower, but
seems like ALL Word functions are running much slower consistently (this has
been proved with intensive tracing). In a nutshell the application renders
tables and colorizes rows or cells using code like:
Word._Document doc = (Word._Document)rc.Document;
Word.Range range = (Word.Range)rc.Range.Range;
Word.Table wt = null;
wt = range.ConvertToTable(
ref seperator,
ref numrows,
ref numcols,
ref initialcolwidth,
ref format,
ref applyBorders, // Apply borders
ref applyShading, // Apply Shading
ref applyFont, // Apply Font
ref applyColor, // Apply Color
ref applyHeading, // Apply Heading Rows
ref falseVal, // Apply Last Row
ref falseVal, // Apply First Column
ref falseVal, // Apply Last Column
ref falseVal, // AutoFit
ref afitbvor, // AutoFit Behaviour
ref tabbvor ); // Default Table Behaviour
wt.Select();
Word.Selection sel = doc.Application.Selection;
sel.Tables.Item(1).Cell( 1, 1).Select();
sel.SelectRow();
sel.Cells.Shading.BackgroundPatternColor = (Word.WdColor)par.Color;
Great care was spent to make the code efficient using word table rendering
techniques given in MVP site :
(http://word.mvps.org/FAQs/TblsFldsFms/FastTables.htm).
Stopping disabling the Virus check program or various other services by
elimination didn't make any difference.
I suspect .NET Framework SP 1 which came with KB867460 (and which is now
included in Windows XP Service Pack 2) could also have played part in this.
My hunch is something to do with a combination of COM Interoperob layer and
additional security checks/fixes introduced in the service pack causing
perhaps dubious retries or timeouts somewhere.
Thanks in advance..