Speed

S

SLL

Hi all-

I am running a very simple program, windows application, that is
having some speed issues. I am curious as to why and am reaching out
for some answers.

My program is connected to a live data feed. The background
calculations are very simple, but I have a lot of labels on the gui
portion of the program, which are currently being used for testing
purposes. These lables (text portion) are also being constantly
updated as my program runs.

Could this be a large factor in the speed of my program?

Any help or reccomendations would be great.

Thanks.

-Sean
 
N

Nicholas Paldino [.NET/C# MVP]

Sean,

Generally speaking, I would say yes. Of course, the code (are you
performing the calcs in the UI thread) and the hardware (how many cores are
you running, and are you updating from a worker thread to the UI thread?
Are you using fire and forget with BeginInvoke if updating from a worker
thread) are all factors.

For your testing, I would take that code out of the UI and create test
cases which don't involve UI interaction. Either that, or find another way
to trace your code, or have a separate "diagnostics" version of your app.
 
D

DrewCE

I agree with what Nicholas said.

In general, any time you constantly update the UI, you will see a
significant effect on performance. If it suits your needs, you might try
polling your results using a Form.Timer every 200ms or so and updating your
form on each tick. Play with the polling period to see what works best.

-Drew

Nicholas Paldino said:
Sean,

Generally speaking, I would say yes. Of course, the code (are you
performing the calcs in the UI thread) and the hardware (how many cores
are you running, and are you updating from a worker thread to the UI
thread? Are you using fire and forget with BeginInvoke if updating from a
worker thread) are all factors.

For your testing, I would take that code out of the UI and create test
cases which don't involve UI interaction. Either that, or find another
way to trace your code, or have a separate "diagnostics" version of your
app.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

SLL said:
Hi all-

I am running a very simple program, windows application, that is
having some speed issues. I am curious as to why and am reaching out
for some answers.

My program is connected to a live data feed. The background
calculations are very simple, but I have a lot of labels on the gui
portion of the program, which are currently being used for testing
purposes. These lables (text portion) are also being constantly
updated as my program runs.

Could this be a large factor in the speed of my program?

Any help or reccomendations would be great.

Thanks.

-Sean
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top