0

First time poster and extremely amateur website maker here.

I made this test site with Konva: https://snuck.in/test/pink

You can tap the square to go to the next page.

It works fine on an old iPhone 5 (iOS 10.3.4). I'm able to tap through endless pages.

When I try it on an iPhone 7 Plus (iOS 13.1.3), I can only tap through three pages and then they start coming up blank. I get the same result in any browser: Safari, Chrome, Firefox, Opera Touch.

Any idea why it would work for three pages and then quit?

Let me know if I can provide more information. Thanks a lot!

elis
  • 3
  • 2
  • probably using browser info and related part of the source code for which you face the problem can help to understand the issue – Saeed Mohtasham Jun 13 '20 at 23:01

2 Answers2

0

Looks like there is the issue with memory leaks in Safari. After several reloads it showed me that the memory is over. It didn't fully clear canvas from memory.

As a workaround you may try to make stage smaller and destroy it BEFORE reload:

box.on('click tap', () => {
  stage.width(1);
  stage.height(1);
  stage.destoy();
  location.href = 'pink';
})
lavrton
  • 18,973
  • 4
  • 30
  • 63
  • i'm experiencing a memory leak on loading many times a stage and some nodes, accidentally i made my angular app loop while generating a konva stage, the thing i don't undestant it that the leak persist even if the browser process is terminated, and i have to restart my machine to reclaim the used memory, i might be missing something but it looks really strange to me, i'm using fedora 32 and angular 10. – Gianluca Pietrobon Feb 26 '21 at 00:11
0

Something I did was setting Konva.pixelRatio = 1 on my code. Safari has a size limit for canvas stuff, and one of the ways to enhance its performance is reducing the scale, especially on my case, where I was trying to set the stage sizes to 1280x1280.

You can see more tips on how perform your app on Konva documentation: https://konvajs.org/docs/performance/All_Performance_Tips.html

nncl
  • 128
  • 3
  • 9