Canvas rendering very slow in Xojo 2017 compared to Xojo 2014?

Canvas rendering very slow in Xojo 2017 compared to Xojo 2014? Has anyone else experienced this? It is like molasses now. Any tips to speed it up?

Are you building your app as HiDPI in 2017r1?

Mac / Windows?

Don’t forget that in HiDPI mode on a high definition screen, 4 times more pixels are managed. That mechanically makes it slower. It would greatly help if you described your configuration, though, as Mac, Windows and Linux don’t necessarily react the same.

You can also speed considerably things by not drawing the entire area, but only part of the canvas that need refresh.

My Mac version seems to run fine. It is not super fast, but good enough, but under Windows 10, it is like molasses. The nature of the drawing makes just refreshing small parts of the canvas impractical. Is there a way to draw it on a non HIGH-DPI mode to make it faster in windows?

Look in the Shared build Settings. There’s a toggle for HiDPI there.

Just to confirm you are using canvas.invalidate( left, top, with, height, eraseBackground) and passing in a rect of the smallest area to be updated?

On Windows, stacking canvases or placing other controls over it can also lead to slow rendering.

I experience similar problems since the Direct2D changes.
On a real PC or even on Windows Terminal Server works better than a virtual machine, but still slower than the GDI+ drawing.

Surprising since GDI/GDI+ is mostly NOT hardware accelerated where Direct2D/DirectWrite is

Indeed, surprising…

One thing to definitely check is the use of Refresh instead of Invalidate
Excessive refreshes can make things slow (on any platform) but we’ve seen this distinction is more relevant now on Windows than it ever was

[quote=343042:@Norman Palardy]One thing to definitely check is the use of Refresh instead of Invalidate
Excessive refreshes can make things slow (on any platform) but we’ve seen this distinction is more relevant now on Windows than it ever was[/quote]

We do use Invalidate and Refresh only when needed. Still the new engine performances are worse than the old one, especially with the Listbox. I hope this will be enhanced in future releases…

Make sure that the video card on the machine you are running on supports Direct2D acceleration. If it doesn’t, Windows runs in software emulation mode and can be very slow.

It depends how its been implemented… https://forum.xojo.com/41680-direct2d-question

We run our solutions mostly on Windows Server, but the RDP thin clients are “kind of” accelerated as from Microsoft docs. In fact the Xojo built apps runs a bit smoother on terminals than on a VMware virtual machine.

However, the performances are still not comparable with the old GDI+ unfortunately.
Additionally, I don’t understand why Windows 7 can run Aero smoothly even in a virtual machine (with support for DirectX and OpenGL) and Xojo Direct2D runs unaccelerated.

Massimo, do you might if I ask (as noone else has) what are you actually doing on the canvas?

Are you doing something computational expensive, or plotting a million bitmaps?

You say that you run on Windows Server, do you have a RDP clients connecting to it, as it seems odd that you would do anything graphically intensive with a UI on Windows Server.

What graphics card do you have in the server?

Does the speed problem you get show with a single user or multiple (if you are doing that)?

What edition of windows server are you using?

Nothing particular. Drawing custom buttons and in some cases (small pictures). Though the UI is very rich, with lots of textFields and other standard controls and these also flickers. Anyway, the slowest drawing occurs on listboxes and we use that a lot to display data.

Absolutely nothing graphically intensive. It’s a ERP system.

I have no idea about that. We have many customers with different servers too.

The problem shows even with a single user. With many users things doesn’t change that much.

What versions of Windows Server are you seeing this problem on?

How do you know that the graphics cards / integrated graphics in these server even perform hardware accelerated graphics?

Are you seeing this on “console” when you plug in a screen on the physical machine, or only via RDP?

Windows Server 2008, 2012. Will test soon on 2016 but won’t expect anything different

The documentation about that is a bit scarce. Googling a bit, I’ve found some Microsoft document talking about a virtual acceleration for terminal connected to Windows Server. And this made sense to me, due I found it performing better than on a VM.

Have not tested this, but would be difficult for logistics problem. And this won’t help me to solve the issue, due the users are all connected via RDP, either via thin clients or Microsoft Remote Desktop.