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

Download chunk in background #254

Closed
ashutoshd11 opened this issue Sep 28, 2022 · 6 comments
Closed

Download chunk in background #254

ashutoshd11 opened this issue Sep 28, 2022 · 6 comments
Labels
question Stale status:waiting-for-response Waiting for a response or clarification from the issue creator

Comments

@ashutoshd11
Copy link

Ask your Question

Is there a config by which we can serve the local chunk first and then check the new version of chunks and download it in the background and serve the new chunk in the next app launch

@jbinda
Copy link
Collaborator

jbinda commented Oct 26, 2022

You can try to play with ScriptManager.shared.prefetchScript. Please check TesterApp->remoteChunks->RemoteContainer

When applying some custom logic to handle loading script next time user opens the app after prefetching it in the background previously, you can achieve described behaviour.

@RafikiTiki
Copy link
Member

@ashutoshd11 Any luck with what was suggested in the comment above?

@RafikiTiki RafikiTiki added the status:waiting-for-response Waiting for a response or clarification from the issue creator label Jan 9, 2023
Copy link

github-actions bot commented Jan 9, 2024

This issue has been marked as stale because it has been inactive for 30 days. Please update this issue or it will be automatically closed in 14 days.

@github-actions github-actions bot added the Stale label Jan 9, 2024
Copy link

This issue has been automatically closed because it has been inactive for more than 14 days. Please reopen if you want to add more context.

@mlakmal
Copy link

mlakmal commented Apr 9, 2024

@jbroma sorry to tag you like this on an old issue. but i am trying to achieve same functionality mentioned in this ticket. we have remote that will be served from cdn. on initial load we are already using local chunk to show the content to avoid waiting on remote download. while we show local chunk we also do prefetch of the remote chunk in background.

i was expecting next restart of the app, native script manager will be able to pull remote chunk from prefetched local file system path. but looks like this support is not built-in (i could not figure this is supported from native source-code for re.pack...) or may be iam missing something. can you please confirm is this support built0in at native script manager level or this needs to be something we have to custom build on our side...

@mlakmal
Copy link

mlakmal commented Apr 10, 2024

nevermind found the docs related to how to setStorage for ScriptManager

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Stale status:waiting-for-response Waiting for a response or clarification from the issue creator
Projects
None yet
Development

No branches or pull requests

4 participants