there are some relay to render in gesture when the number of shapes is more than 325 #2572
Replies: 2 comments 2 replies
-
Now if you have a lot of repeating patterns you want to animated, you might want to looking to having them as a texture: https://shopify.github.io/react-native-skia/docs/animations/textures. , I have test the advice , it is high performance but the circle is very blurry. Especially on the iPhone SE2, when I zoom in on the canvas(max zoom value is 3), the situation worsens.
|
Beta Was this translation helpful? Give feedback.
-
I have solved the question , I use useMemo to cache to reduce the times of rendering, and it is smoothy when pinch or pan . and the offscreen exists the memory leak, I can't finish the way of offscreen to avoid the rendering problem.
|
Beta Was this translation helpful? Give feedback.
-
hey,guys, I need some help. there are 325 circles in the image, and user can zoom or pan the canvas, but when my finger leave the screen , it still update rendering. I think "setState" of react which cost too much time to render the canvas(becuase the number of circles are large) in the gesture event is triggered many times, so it impairs user experience. I want to find a good way to solve it
the phone is iphone SE2.
the code is :
Beta Was this translation helpful? Give feedback.
All reactions