Performance: Do not scan entirely the jobs folder

Related to #11804, does not fix it entirely
Merge pull request #11811 from makinacorpus/perf

Performance: Do not scan entirely the jobs folder