Skip to content

Time to Reflect on Stack Optimization

As the year draws to a close, it’s a fitting moment to pause and contemplate for a minute. Oh, my apologies, in Xojo 2023r4, my contemplation time has been decreased to a swift 30 seconds. Let me make the most of that time to reflect instead…

Overflowing with Gratitude

Our stacks are overflowing with appreciation. Appreciation for not being overworked that is. That’s what they have been doing, being overworked in Xojo 2023r3 and slowing things down. In 2023r4, we have optimized our stack overflow checks to reduce the unnecessary effort expended on this task. This optimization will be especially valued by macOS users, as our stack overflow checks consumed the most time on that platform. Take for example, how many more functions calls can be made in 2023r4 over 2023r3 in just one second:

Var start As Integer = System.Ticks
Var count As Integer
While System.Ticks - start < 60
  Reflect("Thanks")
  count = count + 1
Wend

MessageBox count.ToString + " functions calls in one second"

In 2023r3, we can Reflect (“Thanks”) 1236484 times in one second.

However, in 2023r4 we can Reflect twice as many times, over 2777000 times! That’s a lot of Reflection.

Appreciation for our Users

It would be unjust not to recognize the assistance we’ve received from our users, particularly those who consistently report issues for us to address. A special acknowledgment goes out to those who go the extra mile in helping us pinpoint problems and offer valuable tips and solutions. You know who you are, and we sincerely appreciate your contributions!

William Yu grew up in Canada learning to program BASIC on a Vic-20. He is Xojo’s resident Windows and Linux engineer, among his many other skills. Some may say he has joined the dark side here in the USA, but he will always be a Canadian at heart.