New Window Open is slow

First of all, I have to explain a bit.

While my main laptop is doing intensive work (update ?) decided to update an old project using a MacBook Pro M1.

Of course, witj Xojo 2021r1.1.

So, the work goes and goes, and finally, I move the project to my main laptop (MacBook Pro i5, El Capitan, Xojo 2015r1).

Then, when running n the IDE or as Stand Alone, when I click in a Canvas button, I get its image nverted for around 4 seconds and it tooks another second to display the new window.

This behavior exists nly for this window, not for the other windws (I do not changed the code on the other windows)

The “original” project works fine.

On M1, I cannot talk about a slowdown because I get a dialog asking permission to use data on disk before the new window is displayed.

It may not be a good idea to move a project from version to version.

And, of course, when I will have some minutes, I will rollback the new code to the previous version and discard this project once all goes well.


check if there are unnecessary paint events.
plus use menu project / profile code.
for a test you can put a return in any events and see whats happens time-saving.

What does your code in the action event of the canvas button do? Have you used the debugger to go step by step trough the code and don’t see what causes the delay? Maybe it’s the code in the Open event of the new window.

I do not modify the events. The modified code was in a Metod called by a PushButton.

The code only load Pictures (2) and draw them add a Rectangle in both cases.

That is why I beleive I’d better not use the project modified by Xojo 2021.r1.1, but move the changed code.

And I tested it with a clean boot, only running applcation and no Internet (the computer was “cold” (no fans with loud noise).

                 Syntax Error. ')' expected.

Loading a picture smells like delay…

2 H (night): I can have this kind of troubld. Worst, the compilet does not report it ! :wink:

the “delay” happens before the window drawing itsekf begans…

More later after I report the changes to the previous version.

One “great” difference s in one case I use a PopupMenu, and in the other (recent) case, I use a ListBox to choose the Template (I load each of the images and paint a 30 x30 copy in Column(0) and part of its name in Column(1). 15 images, 4.2MB each (Ouch I will say) @300 DPI !!!. *

That is probably the time difference.

  • I may copy that folder and resize these for that use. 6 seconds to wait (especially for testings) is really boring.

I added this change a month (or so) ago. Of course, I forgot the code since then.

Rhe slowdown decrease drastically to around 1 second.

More code to add, but it is good now.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.