Bad `get()` performance with many jobs
Opened this issue · 0 comments
alecgibson commented
I know this library is no longer maintained. We've moved onto our own fork, but just documenting this here because we spent a day hunting down this performance issue.
This library has bad get()
performance when there are lots of queued jobs.
This is because:
get()
queries ondeleted
andvisible
, which has an index- but it sorts on
_id
, which can't make use of the above index
The trivial fix is to change it to sort by visible
, which is in the index and should give similar (if not better?) results, presenting the job that was made visible first (as opposed to the job that was created first).