Control render delay opening window

Does anyone know why there is a delay drawing the listbox in the second part of the video below?

Everything here is a new project, with no code changes, all I’ve done is dropped on a textbox, button and listbox (in that order), all default settings no changes have been made (I have also tried a fresh reboot). PC specs are not an issue.

This only happens in windows from 2016r4.1 onwards, 2016r3 is fine and fast, I have tested 2016r4.1 on mac and it works without delay.

https://www.dropbox.com/s/tp4s5b5t2nktpvs/ControlDelay.mp4?raw=1

Thanks

As someone else suggested, if possible skip 2016r4.1 on Windows…

The same thing happens on 2017r1 though (what I was actually using when I saw the problem), which is why I went back to see where it was introduced.

Is this a physical machine or virtual?

Physical

Interesting. 2016r4 introduced Direct2D and with it, hardware acceleration of graphics. Does your graphics card support Direct2D?

I only ask because the IDE is quite snappy on my physical machine.

According to the wiki, Direct2D is supported on any card that can support Direct3D Feature Level 9 with WDDM 1.1

EVGA Titan X (pascal)
(from dxdiag)
Feature Levels: 12_1,12_0,11_1,11_0,10_1,10_0,9_3,9_2,9_1
Driver Model: WDDM 2.1

So that would be a resounding yes :slight_smile:

Could you make that exact project available so I can try it here?

https://www.dropbox.com/s/vs6ub3emnb9fonl/BugSlowControlDraw.xojo_binary_project?raw=1

As I am on Windows also, I would like to test it also on vm and physical windows machines.
But please, could you provide a zip rather then a binary? My browser gets screwed on this link.

https://www.dropbox.com/s/331rotrgrirx8co/BugSlowControlDraw.zip?raw=1

Let me know if that doesnt work Joost, and I’ll host it off dropbox

Julian, I’ve tested with 2017R1 build on 2 totally different Win7 physical machines and Win7 VM, and Win10 on VM.
I don’t see the problem as you recorded. Here your project worked fully as expected.

Hmmm interesting.

I have built the project and run it on my desktop where it shows the delay. I’ve then copied the built version to a windows 2012 vm and it runs with no delay on opening.

Any pointers for how I can go about diagnosing this?

I’m about to reinstall windows on this machine anyway, I’ll report back in a few hours if its any different on a fresh install.

Well a fresh install of windows fixed that problem.

No doubt, 2-3 months down the road I’ll reinstall something it doesn’t like and it’ll happen again :wink:

Thanks for looking into it everyone.

Hmm, the problem is back already.

Preliminary investigation looks like its happening due to the latest install of my nvidia drivers which updated a few days ago (I thought I’d not seen this problem before).

v378.92 update on 2017.3.20

I’ve just removed them from my new windows install and the delay has gone.

I’ll try putting on the previous version of the drivers and see if the problem re-appears. If not I’ll try the latest version and see what happens.

I will report back.

nvidia drivers 378.78 run at expected speed without any delay on startup

Moving to latest drivers for next test.

Well its working fine with the latest drivers now.

That’s stumped me.

After another windows reinstall I’ve figured out the problem. It lies with nvidia’s abaility to record any directx output.

The action of turning this option on/off causes an ever so slight delay in drawing the listbox.

If you turn this option on and place a number of listboxes on the window you can actually see each one draw when the window is opened. If you turn it off and try it, the draw is instant.

I’m assuming that the delay is caused because the whole window isnt a single direct2d render target so the delay happens mid draw as each render target is created.

I’ll create a feedback about this later to see if it can be looked at.