Groups async calls where possible rather than doing them sequentially
Moves some checks to be done synchronously without await
Extracts live photo logic into a private method that metadata extraction runs
No longer queues live photo job as part of upload pipeline
Besides being significantly faster, it also makes job progress more intuitive as the number of waiting jobs goes down as one would expect without other jobs being queued in their place.
Testing
The y-axis is jobs/s. The first part is main and the second is this PR. The jump toward the end is when the queueing job finished queueing assets (the job is somewhat intensive with a large table). There is an increase on main as well if you look closely, but it's more subtle. I canceled both when their progress rate stabilized after the queueing job finished.
Description
await
Besides being significantly faster, it also makes job progress more intuitive as the number of waiting jobs goes down as one would expect without other jobs being queued in their place.
Testing
The y-axis is jobs/s. The first part is main and the second is this PR. The jump toward the end is when the queueing job finished queueing assets (the job is somewhat intensive with a large table). There is an increase on main as well if you look closely, but it's more subtle. I canceled both when their progress rate stabilized after the queueing job finished.