Hi Guys.

I have a problem, hopefully you can help me.

I am working with automation software and on my HMI software I have a small
performance problem.
Sometimes it is possible to show the code of a control program, what it
(sometimes) about 145,000 lines (or more).

It comes out of the control as one string.

I tried to show the code in a textbox, but this takes about one minute to
show up. My HMI is frozen during the time.
Yes, I am using a background worker (async), so I dont understand why it
freezes up the whole HMI.
(its only the line filling the multiline textbox).
The code in this case is only one line:

>> textbox1.text = codefromControl.code;


So, I changes to code to a stringbuilder, which is filling the textbox.
I splited the text up in lines, and tried different ways to fill up the
textbox (trying as less refreshes of the textbox as possible).

The best performance I got was 10,000 lines in 0.7 sec.
But this means its still 15sec to load the screen (its frozen in all
scenarios with my background worker, and I dont know why).

So, I need to know

- how can add my controlcode to the textbox with the best performance?
- some ideas ( I know I dont posted code) why writing to the textbox freezes
my HMI and why my background worker isnt working?
- some ideas to increase performace? perhaps different control - listview,
richtextbox, etc?
- How can I realize that the screen is loaded, the first e.g. 1000 lines are
displayed and the rest is loaded in the background ( I tried this out for a
couple os days, but I got it never running (see the other problems, its
always freezing up).

Thanks a lot th everybody in advance.

Mike

Reply via email to