Slow events

  • Thread starter Thread starter Marten Van Keer
  • Start date Start date
M

Marten Van Keer

Given two .NET applications A and B. These two application communicate with
each other by using an object C:

A --> C <-- B

Application A has a listview. This listview can be refreshed by pressing F5
OR externally by receiving an event from C.
C will raise an event when it receives data from B.

So, B sends a message to C. And C raises an event that is "catched" by A.
When A receives the event it starts a refresh of the listview.


My problem is: The "F5"-refresh in application A is very fast. The Exteral
refresh of Application A goes very very very slow... (the listview is filled
line by line)

Has anyone an idea why ?
 
* "Marten Van Keer said:
Given two .NET applications A and B. These two application communicate with
each other by using an object C:

A --> C <-- B

Application A has a listview. This listview can be refreshed by pressing F5
OR externally by receiving an event from C.
C will raise an event when it receives data from B.

So, B sends a message to C. And C raises an event that is "catched" by A.
When A receives the event it starts a refresh of the listview.


My problem is: The "F5"-refresh in application A is very fast. The Exteral
refresh of Application A goes very very very slow... (the listview is filled
line by line)

How do you "refresh" the ListView? Are you passing the new data to the
event handler?
 
What Herfried meant in his question was how are you going about refreshing
the ListView!

In other words, what are you calling "Refeshing the ListView"


--
Ibrahim Malluf
http://www.malluf.com
==============================================
MCS Data Services Code Generator
http://64.78.34.175/mcsnet/DSCG/Announcement.aspx
==============================================



CJ Taylor said:
communicate
pressing
by
A.

How do you "refresh" the ListView?

I thought you were the MVP... =)
 
Yes... I got that...

Every now and then, espeically thursdays, I like to joke around with
herfried, especially with things he says that makes me laugh..

because he's so damn "proper". =)

love ya herfried, but not that way..


IbrahimMalluf said:
What Herfried meant in his question was how are you going about refreshing
the ListView!

In other words, what are you calling "Refeshing the ListView"


--
Ibrahim Malluf
http://www.malluf.com
==============================================
MCS Data Services Code Generator
http://64.78.34.175/mcsnet/DSCG/Announcement.aspx
==============================================
 
With refreshing the listview I mean:

Go query the database , clear the listview and reload the data into the
listview.

IbrahimMalluf said:
What Herfried meant in his question was how are you going about refreshing
the ListView!

In other words, what are you calling "Refeshing the ListView"


--
Ibrahim Malluf
http://www.malluf.com
==============================================
MCS Data Services Code Generator
http://64.78.34.175/mcsnet/DSCG/Announcement.aspx
==============================================
 
* "CJ Taylor said:
Yes... I got that...

Every now and then, espeically thursdays, I like to joke around with
herfried, especially with things he says that makes me laugh..

because he's so damn "proper". =)

love ya herfried, but not that way..

;-)))
 
* "Marten Van Keer said:
With refreshing the listview I mean:

Go query the database , clear the listview and reload the data into the
listview.

As asked before: How do you add the data to the listview when working
with the event handler? Do you pass it to the event handler? Or are
you querying the data in the event handler?
 
I am querying the data in the event handler..

Herfried K. Wagner said:
As asked before: How do you add the data to the listview when working
with the event handler? Do you pass it to the event handler? Or are
you querying the data in the event handler?
 
* "Marten Van Keer said:
I am querying the data in the event handler..

How do you add it to the ListView? Doing that in the event handler
should not reduce the performance...
 
Hi Herfried,

Because I thought this is a very old problem and my thought was also that
Marten had told previously that it had to do with threads. The F5 is direct,
while with the threads they need to be busy processing.

Therefore maybe Marten can look if setting the prioritys from the threads to
high, he maybe could come closer to the problem.

But it is all guessing like the previous time we saw this problem.

Do you understand now why?

Cor
 
* "Cor said:
Because I thought this is a very old problem and my thought was also that
Marten had told previously that it had to do with threads. The F5 is direct,
while with the threads they need to be busy processing.

Therefore maybe Marten can look if setting the prioritys from the threads to
high, he maybe could come closer to the problem.

But it is all guessing like the previous time we saw this problem.

Do you understand now why?

Yep. I only wanted a confirmation of my thoughts...

;-)
 
Back
Top