We’re automatically updating a bunch of our internal packages when Unity starts using Client.Add however this can take up to 10 minutes, I recently figured out that manually editing the manifest.json is several times faster than using Client.Add. I don’t see a reason for why it would be so much slower.
Kind regards,
Jurjen
Ps. the requests returned from the Client method should really have a completed event that you can subscribe on…
Correct me if I’m wrong, it sounds like you are comparing
A script that iterates over a list of packages and {{Client.Add()}}s them one after the other
vs.
Modifying multiple entries in the manifest.json and then having Unity resolve the manifest once
If this is the case, then yes unfortunately it will take significantly longer for the script to install all packages. This is because {{Client.Add}} also refreshes the Asset Database so each call is resolving the manifest, importing all assets and then compiling all scripts. If you make all your edits to the manifest manually in one go, then return to Unity, the resolving, importing and compiling is only done once. The good news is, we are planning some kind of batch mode API which effectively does the same thing as option 2. i.e. make all the manifest edits once and then resolve/import/recompile once
The team is currently working ton the new API but we don’t have an ETA on when it is going to be ready. The new API is on our roadmap and we’ll let you know when it is ready!