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

Store popup is slow? #4

Open
Jonovono opened this issue Nov 16, 2017 · 2 comments
Open

Store popup is slow? #4

Jonovono opened this issue Nov 16, 2017 · 2 comments

Comments

@Jonovono
Copy link

Is this expected? I notice when I open the store modal it takes around 5-10. Is this usual?

@simonemarinelli
Copy link

+1

@robhogan
Copy link
Owner

robhogan commented Feb 10, 2018

It’s network dependent but it can take a while, mostly for the screenshots / app preview thumbs. That’s just the speed of the underlying native calls so not a lot we can do.

If you prefer you can present the view before it’s finished loading, the user will see the product page immediately appear and gradually load in front of them - the App Store app does this. I'd recommend waiting for the 'loading' event just to be sure there aren't artifacts remaining from a previous load.

This would feel much more responsive if you're loading on-demand:

StoreViewManager.loadProductWithParameters({ /* .... */ });
StoreViewManager.once('loading', () => StoreViewManager.presentViewController());

If you only have one App Store link you may find it useful to optimistically pre-load it, ready to present when tapped. The underlying current API is a singleton though so it’s not possible to preload more than one product (although I suppose there might be a cache involved within the store view - I haven’t experimented with this).

(Edit: It looks like it might theoretically be possible to pre-load multiple views but this module doesn’t currently support that. Let me know if that’d be useful, PRs welcome also)

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

3 participants