Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delay when showing the view in android navigation #112

Open
vallemar opened this issue Sep 30, 2023 · 4 comments
Open

Delay when showing the view in android navigation #112

vallemar opened this issue Sep 30, 2023 · 4 comments

Comments

@vallemar
Copy link

When I navigate to a page with lottie it has a delay until it appears, it can be seen in the video. It is not always the same delay, there are times it is more and other times it is less

Grabacion.de.pantalla.2023-09-30.a.las.10.55.18.mov

It doesn't just happen to me with that lottie, I have another one on another screen and I also have the same behavior

Note: I have tried to put everything directly in the initNativeView method of the plugin so that it does not take long to start the properties, but it keeps doing the same thing
Captura de pantalla 2023-09-30 a las 11 18 49

@farfromrefug
Copy link
Member

It must be the loading / parsing of the Lottie content which might be taking some time. Have you tried using a file path? (Which is what you should always do).
You can create a repro sample project

@vallemar
Copy link
Author

vallemar commented Sep 30, 2023

@farfromrefug I have found the problem, it is its fork  😅, with NS this does not happen. I found it because when creating the simple demo it didn't happen and I tried with the fork and that's when it happens, this is the example:

Repo: https://github.com/vallemar/ns-lottie/tree/main
Comment this for disable fork: https://github.com/vallemar/ns-lottie/blob/main/webpack.config.js#L7

Note: It is not seen in all navigations, so if it is not detected, enter and exit several times. In my project it is more noticeable, I think it is because I have more views

And yes, in my project I use the assets path for the Lotties, the previous string was only a test to check that it was not slow loading the file

@farfromrefug
Copy link
Member

OK great will test and see what could be wrong in my fork ;)

@farfromrefug
Copy link
Member

@vallemar I dont see any delay with your demo app. Neither on an emulator(android 10) nor on a real device (android 13).
I must have navigated a 100 times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants