VincentCATILLON / react-native-confetti-cannon

React Native confetti explosion and fall like iOS does.
https://vincentcatillon.github.io/react-native-confetti-cannon
MIT License
471 stars 61 forks source link

android app works slow after using this library #51

Open shivam0831 opened 3 years ago

shivam0831 commented 3 years ago

while using this library in android after using this library app works very slow. any suggestions to solve this?

VincentCATILLON commented 3 years ago

Hi @shivam0831 , I can't give your tips without any code or informations about your usage of the lib.

As it renders all particles at the same time in parallel, you can obviously use a reasonable amount of items, like 100 or 150 max, to avoid performances issues.

I'd like to add that this lib uses native rendering and RN API (Animated / Animations), to animate them, so I don't see how I can improve it :)

apoorv-kansal-trysolvio commented 3 years ago

@shivam0831 I found that you can conditionally render the Confetti component when you want to show confetti. Maybe this part can be put in documentation as a warning. Putting 200 (as shown in the example) is quite a lot and causes app to load.

Also, @VincentCATILLON maybe if autoStart is set to start to false you can not create the items in the starting. And only when start method is called?

echolove38 commented 2 years ago

fist time , too slow

alz10 commented 2 years ago

@VincentCATILLON Any update on the library? There are Pull Requests that are very useful waiting for you to merge. I'm also experiencing this slow performance on android. I had to lower the confetti count to 100 instead of 200. The performance delay is still a bit noticeable tho

pTinosq commented 3 months ago

two years on... guess it's a gonner :(