Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
9
Erster Beitrag:
vor 3 Jahren, 3 Monaten
Letzter Beitrag:
vor 3 Jahren, 3 Monaten
Beteiligte Autoren:
Curtis, DarrenF, Fabrice Harari, Alexandre Leclerc, DW, Joris

[WD19] Slow Response of Main Window

Startbeitrag von Curtis am 18.03.2015 14:36

tl:dr - Slow response of Main window concerning redrawing and record switching.

I'm writing a program that opens to a Main window. It consists of a file menu, an icon toolbar, a sidebar, and various panes. The panes contain either dashboard controls or table/form combos.

When enlarging the Main window everything redraws very slowly. It's not smooth at all. Also when switching between the records of a table it takes a second or two for the linked form to catch up. The table is a memory table.

Any ideas or thoughts? I'm still looking through to try and find the culprit, but so far everything is clean.

EDIT: I've been able to speed up the table/form linkage by changing all my lookup controls to load in memory. Still experiencing the redraw problem.

Antworten:

Hi Curtis

one thing that you can try:
- stop the window display (it's a window's property)
- do your data change
- restart the window display

This will greatly diminish the number of drawing operation, and therefore should help quite a bit

best regards

von Fabrice Harari - am 18.03.2015 15:46
Hi Curtis,

If you want to see what's going on while your app is running, something I use from time-2-time is the Performance Profiler. It can be turned on/off at runtime in your code or you can use win/shift F10 & F11 to turn on/off when you need to. It dumps a file to your HDD which can be interrogated later.

Anyhow, take a look here - it might be useful?
http://help.windev.com/en-US/?2030035&name=Performance_profiler

von DarrenF - am 18.03.2015 16:02
Yourwindow....DisplayEnabled = false

Run your code then

Yourwindow....DisplayEnabled = true

This will stop the flickering

DW

von DW - am 18.03.2015 21:25
Quote
DW
Yourwindow....DisplayEnabled = false

Run your code then

Yourwindow....DisplayEnabled = true

This will stop the flickering

DW


On a simple resize? I have no code running on resize...

von Curtis - am 19.03.2015 14:24
Maybe it's the 'row display code' in one of your tables?

Joris.

von Joris - am 19.03.2015 15:04
Hi Curtis,

Which version of WD do you have and which skin template are you using? (I ask because under WD17/18 using the iStyle template was causing in itself a lot of problems. The reason was because there was a png file completely transparent. Once the file was replaced with a clear gif (for example) the speed was back. It was doing so when using the "Tab Page" control.

Aside that, make sure that you do not have too many processes that are run on a size change. Like Joris said, if you have tables with "row display" code, for example, this can slow things up quite a lot.

As Darren suggested, run the performance profiler, it could show who is the culprit, if there are any.

Best regards,
Alexandre Leclerc

von Alexandre Leclerc - am 19.03.2015 15:58
Even running the code through in debug mode can sometimes show window events being triggered that you don't expect. In some cases these window events are repeatedly triggered.

von DarrenF - am 19.03.2015 16:19
Hi Curtis,

Quote
Curtis
On a simple resize? I have no code running on resize...


yes... Exactly... In the window resize code, deactivate the display stop the timer then restart a timer for 1/10 of a second...
In the timer code, deactivate the timer and activate the window display

This way, no display during resizing

Best regards

von Fabrice Harari - am 19.03.2015 18:47
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.