Alvin,
Thanks for the reply.
I didn't know that DataSet too has thread affinity to the thread on which it
was created (not the main thread, typo I guess). In any case, I am updating
the DataSet on the same thread that created it.
Find routine is too slow for large number of hits.
DataSet is updated by a single thread all the time, in a sequential manner.
Its not the Form that updates the DataSet, its the message that TIBCO sends
as a Hashtable. Since the Grid is bound to that DataSet and each instance of
that form has a DataView on this Master DataSet, the view is updated as soon
as the Row is updated.
Probablity of it being a performance issues or unhandles exception is less
because I am logging all the exception that I handle and I am handling all
the exceptions.
My question still remain the same:
- is it alright to update the DataSet on a thread different than a thread
(its still the same thread that created the DataSet) that created the Grid to
which the DataSet is bound?
- If its not the right way of doing then I can't afford to update the
DataSet on the main thread that created the forms and controls (including
grid) because the number of updates are too high (10000 per minutes with ~90
columns in a row) and that would affect user interaction with the application.
Is there any workaround?
Thanks a lot.
Lalit
"Alvin Bruney [MVP]" wrote:
> This is not a deadlock problem. It's likely a performance issue or an
> unhandled exception.
> The dataaset has thread affinity to the main thread and its also tied to the
> dataview object so you need to correctly marshal your update calls using
> invoke. I don't understand why you have a dataset and a hashtable though.
> You can do without the one. I'm not sure how much performance improvement
> you are getting from a hashtable as opposed to a dataset find routine. The
> dataset find routine uses an optimized indexer underneath so retrievals are
> fast.
>
> Another problem i see is that you have a master dataset but it doesn't
> appear to be wrapped in a class. So you can possibly cause the dataset grief
> if multiple forms trigger the acceptchanges function within a short space of
> time or at the same time. Datasets weren't meant for concurrent access.
> --
> Regards,
> Alvin Bruney [MVP ASP.NET]
>
> [Shameless Author plug]
> The Microsoft Office Web Components Black Book with .NET
> Now Available @ http://tinyurl.com/27cok
> ----------------------------------------------------------