all groups > dotnet performance > january 2006 >
You're in the

dotnet performance

group:

Excel VSTO Listobject control databinding performance problem


Excel VSTO Listobject control databinding performance problem gianni
1/10/2006 12:47:40 PM
dotnet performance: Hi all,
I have made a test with VSTO Excel databinding using listobject binded with
a dataview. This dataview/datatable is created by my code and upadated in
memory when I receive some notification via my mesage oriented middleware,
to simulate update of some financial market data (esample: update quotation
of stock equity). I have only 10 rows with 3 colums updaded with a frequency
of 200 ms.

My porpouse is to view data update in excel cells. So, after setting
datasource of a listobject, i can't call disconnect, elsewhere the data
isn't more updated. Well, when I have the bind setted (list1.datasource =
mydataview), excel isnt' more usable , consuming 50% of my CPU (P4 2,3GZ
1GBMemory), When I disable the bind, although my "engine" continue to update
memory datatable, the CPU became completly free and Excel Application occupe
max 1% CPU time. My idea is that listobject binding is wide CPU time
expansive, and I havent' idea how set about binding propriety or what are
the alternative method to reach my goal. Seem me very strange the difference
between performance when binding is active respect when is disable
(list1.datasource = null).
Note that I have already bind my dataview to another object that support
binding (Devexpress XtraGrid control) without big performance problem.

Maybe, aren't the object model of excel (COM based and used in .Net via
Interop), and listobject control that use it, suitable for display frequenty
update of a memory.Net datatable?

Can someone give me a suggestion to resolve my problems (binding settings,
or note on other possible my mistake) or an alternative to reach my goal?

Thanks in advance for the answers.

Gianni

Re: Excel VSTO Listobject control databinding performance problem Alvin Bruney - ASP.NET MVP
1/12/2006 10:09:55 AM
That is quite a lot of updating by the way. You can't manipulate settings on
the bind process to make it more efficient either. What kind of data are you
showing? Simple strings or complex objects?

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



[quoted text, click to view]

Re: Excel VSTO Listobject control databinding performance problem gianni
1/12/2006 4:42:55 PM
Hi Alvin,
my memory datatable is composed only of string (varchar, 2 columns) and
double (3 columns).
The updates are only for double type. No complex data/object are involved.
For me, I can spoke of performance problem of Excel ListObject databind
because, on the same machine and in the same condition, I can running my
engine , without performance problem, with the same datatable binded to
Devexpress Xtragrid component, and with same update frequency.
I have already try to recompile my engine with VSTO 2005 (before I tried to
use my DLL compiled with framework 1.1 and ADO.Net 1.1), but the result
didn't change.
My "engine" produce a memory datatable and this is updated from my Message
oriented middleware from market data change event: in this application
context, update with frequency of 300-500 ms are normal, and the problem
grow in relation of number of rows of datatable.
Another information that can be useful: I have observed that at the startup
of my Excel template, some button on sheet1, that I set Visible=false, are
visualized by excel, and only after 5-6 seconds they desappeared from sheet:
are this behaviour normal, or maybe I have some problem on my PC on VSTO
installation that involved also Databinding performance?


If you have some suggestion...
thanks Gianni


[quoted text, click to view]

Re: Excel VSTO Listobject control databinding performance problem Alvin Bruney - ASP.NET MVP
1/13/2006 12:42:12 PM
I'd suggest submitting this to MS to have them look at it.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



[quoted text, click to view]

Re: Excel VSTO Listobject control databinding performance problem LeProgrammeur LeProgrammeur
5/14/2006 6:52:33 PM


Hi,

I noticed that you are using the DataSource property.
Why don't you use the SetDataBinding passing the datatable object?
I learned this from a tutorial about Visual Studio Tools for Office.
Go to www.kynou.com and search for ListObject.

I hope this helps.

AddThis Social Bookmark Button