You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def installPackage(pkg):
apk = fetchPackage(pkg)
files = ExpandApk(apk)
installFiles(files)
def installPackages(packages):
for pkg in packages:
installPackage(apk)
Where we do fetch, expand, and install serially for every package.
The only part that really needs to happen serially is the installFiles step. We can concurrently fetch and expand all the packages, then serially run installFiles on all the results.
We probably want the fetch and expand stage to return a promise-like thing so we can start on the installFiles stage as soon as the next result has finished being fetched and expanded.
Here's some kind of weird go python js mashup of what I mean:
def async fetchAndExpand(pkg):
apk = fetchPackage(pkg)
files = ExpandApk(apk)
yield files
def installPackages(packages):
todos = make([]todo, 0, len(packages))
for i, pkg in packages:
go func():
todo[i] = fetchAndExpand(pkg)
for todo in todos:
files = await todo
installFiles(files)
The text was updated successfully, but these errors were encountered:
jonjohnsonjr
changed the title
Parallelize fetch and expand
Parallelize fetch and expand phase across APKs
Jul 1, 2023
Building on #773
We currently do something that looks like this:
Where we do fetch, expand, and install serially for every package.
The only part that really needs to happen serially is the installFiles step. We can concurrently fetch and expand all the packages, then serially run installFiles on all the results.
We probably want the fetch and expand stage to return a promise-like thing so we can start on the installFiles stage as soon as the next result has finished being fetched and expanded.
Here's some kind of weird go python js mashup of what I mean:
The text was updated successfully, but these errors were encountered: