Screen refresh speed


Recommended Posts

Hi,

Some info on a recent experience.

I have just been developing an app on an old Athlon XP based machine running Win XP with 4GB ram, and it runs fairly well considering there are a lot of calculations running in background. I have become used to the screen flashing and lots of blank screens (white) during refreshes, assuming that it is the slower machine. I have all of the page refreshes set at 1 sec.

Then I run the application on a new Intel i7 based machine with heaps of ram, solid state drive and Win 7 and although the app runs much, much smoother, there is still a noticeable amount of blinking pages and white screens during page refresh. This doesn't make sense and is not what I would have expected. While I appreciate that there are many factors at work here, how can I explain to a customer why his new PC will run the latest 3D games smoothly at 30fps, but have noticeable screen flicker on a SCADA app running some basic graphics and simple, albeit long, calculations.

Has there been much work done on release 6 to improve the page refreshes?

Link to comment
Share on other sites

The issue is most likely in your application. DAQFactory has been around for a lot longer than XP and 4 gig, and runs fine even on old pentium class PC104 systems with 256meg. Somewhere you are doing something that is stalling the primary thread of the application. It could be the calculations, but its more likely just something simple like a delay() in an event, or something like that. Perhaps you can post your document and we can take a quick peak for you.

Link to comment
Share on other sites

I'm pretty sure I have no delays in the events, however I am doing a lot of colour handling in the OnPaint events, mainly to allow the components to change color and more importantly flash under certain conditions. While most of this could have been done using the built in colour properties, flashing the components alternating colours (as opposed to blinking) was something I couldn't figure out how to do without using the OnPaint event.

Is it possible to attach a file to a post without making it publicly available?

Cheers

Link to comment
Share on other sites

That is probably the problem. OnPaint needs to be really fast, and DAQFactory script pretty slow, so really OnPaint has to be only a few lines long. But post your script and we'll take a look. You can either post it here and just tell us to keep it private and we'll delete the post once we download it instead of making the post visible, or send us a personal message through the forum with it attached.

Link to comment
Share on other sites

Well, it runs quite quick on my machine, so nothing apparent. Does it get slower over time? Does it do it just when certain pages are displayed? Try switching pages without using the popups, just click on each in the Workspace. When you find the one that is slow, start deleting controls until it speeds up.

I also would use a lookup table instead of the case statement for determining colors. You only have 7 status' so the table would be short. To make one alternate colors, just create a sequence that runs in the background and at whatever interval you want, changes the lookup table, adjusting the desired color. This will make your OnPaint event sequence basically one line long which will execute a fair bit faster than what you have.

Link to comment
Share on other sites

Yeah, the white screens are weird because DAQFactory draws to a background buffer than does a big memory move to the video card when its done. This is a standard flicker-free animation technique. I actually wonder if it is your controls though, as Canvas controls run in a background thread. Does it only do it when a popup is displayed? Anyhow, try to isolate the cause by stopping or deleting things. Backup your document first, just in case you accidently hit save!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.