Greedy scheduler speedups and test
Significant speedup to greedy scheduling, especially with very large schedules.
I used 3 variations on the large Messier1-40 esl from @edejouhanet to measure Greedy scheduling time.
- using minAltitude=0
- using minAltitude=30
- minAltitude=30 plus a large artificial horizon.
The 3 times given below are elapsed time Greedy scheduling that esl on those 3 tests (averaged over 2 runs of the testGreedyMessier test) on a MacbookPro laptop.
Before these changes, elapsed times were 1.37s 2.51s 3.06s
After these changes the elapsed times are 0.07s 0.12s 0.13s. (Those are not typos!)
The speedups in order of effectiveness (most effective first) are listed below.
Except for the first two rows, the times given are the elapsed times WITHOUT the given speedup.
speedup | minAlt=0 | minAlt=30 | horizon + minalt30 |
---|---|---|---|
Original elapsed times | 1.37s | 2.51s | 3.06s |
Using this MR | 0.07s | 0.12s | 0.13s |
(without) Disabling graphics updates during scheduling: | 0.70s | 0.80s | 0.84s |
(without) Caching the getNextPossibleStartTime() calculation: | 0.18s | 0.70s | 0.80s |
(without) optimization in the greedy scheduler loop: | 0.11s | 0.12s | 0.15s |
(without) Caching the artificial horizon altitude calculation | 0.07s | 0.11s | 0.15s |
(without) Moving to the next dark time quickly | 0.07s | 0.12s | 0.14s |
Edited by Hy Murveit