bacalhau-project / bacalhau

Compute over Data framework for public, transparent, and optionally verifiable computation
https://docs.bacalhau.org
Apache License 2.0
704 stars 89 forks source link

Improve performance for job list #3571

Open rossjones opened 8 months ago

rossjones commented 8 months ago

Currently the job list command is extremely slow, this is likely because it is iterating through all of the jobs before taking a slice for the results. cf, demo db is currently \~7GB

We should instead iterate through the list of jobs using the offset and limit to stop processing as soon as possible. e.g. decrement an offset and ignore the record until we get to 0, then when adding to results decrement the limit until we reach 0. This gets much harder if we need to apply filters but we can at least improve the performance of the default list.

rossjones commented 8 months ago
wdbaruni commented 7 months ago

https://github.com/bacalhau-project/bacalhau/pull/3572