scheduler.py: Optimize scheduling by not calling it unnecessarily

Description

This modifies how we schedule new jobs to optimize the scheduler's loop.

This should reduce the number of missed events we get and reduce the pressure on the _sched method, by calling it less often.

This resolves point 3 of #336 (comment 255606307)

Benchmarks

  • Finished in: 92 mins, 33 secs
  • Number of builders: [4, 8, 12, 24]
  • Target files: base-files/base-files.bst
  • Number of runs: 4
  • Number of warmups: 2
  • Python versions: py37
action python_version commit median time (secs) mean time (secs) ± std
build - 12 py37 bschubert/optimize-scheduling - 68323e10 90.81 90.77 ± 0.50
py37 master - 454ed339 121.425 121.35 ± 0.22
build - 24 py37 bschubert/optimize-scheduling - 68323e10 90.87 90.73 ± 0.42
py37 master - 454ed339 119.8 119.85 ± 0.16
build - 4 py37 bschubert/optimize-scheduling - 68323e10 98.19 98.20 ± 0.46
py37 master - 454ed339 121.305 121.32 ± 0.32
build - 8 py37 bschubert/optimize-scheduling - 68323e10 90.65 90.66 ± 0.55
py37 master - 454ed339 123.96 123.95 ± 0.23
show py37 bschubert/optimize-scheduling - 68323e10 8.225 7.98 ± 0.59
py37 master - 454ed339 4.84 4.83 ± 0.02
show - cached py37 bschubert/optimize-scheduling - 68323e10 8.23 8.19 ± 0.12
py37 master - 454ed339 8.005 7.90 ± 0.42
Edited by Benjamin Schubert

Merge request reports

Loading