Strange performance issue

I’m writing a game (a clone of the game “untangle”) and I’m quite happy with how it turned out.

However, while yesterday the game was running well on my phone, today after a few small additions for new features I noticed that the game was painfully slow on my phone (and spinning up my fans on the laptop).

I naturally thought that the issue was one of these new features so I duplicated the game project and started removing features. I removed so much that at this point the simplified version is very simplified and with a lot fewer features than what I had yesterday when it was running fine. Still, it runs very slowly. I even tried looking at it with Chrome’s dev tools to profile it but nothing showed up as seemingly problematic.

I was wondering if a kind soul could take a look and see if anything there is as a clear source of slowdown, like a function that changes a variable type to something that is much slower to use. The program is so simple now that I cannot understand why it is still so slow on my phone when yesterday was much nicer.

Thank you in advance.

All the best,

Simplified version of the game:

1 Like

I think this might be an issue with the “present” link. Using "sketches: or “full” like this:

gives much better performance than this

1 Like

Hello, and welcome to the forum!

That’s a great idea, taking the guesswork out of the equation. Did you do the profiling on the actual phone? If not, here’s a guide to get started with remote debugging:

1 Like