I noticed opencpn
was taking almost 3 seconds to start on my computer (and much longer on slower computers) when lots of plugins are enabled, and I felt like this was too slow, because some computers
it's more than 10 seconds.
I managed to gain a 15% speedup by removing redundant initializations. Next, I was able to defer non-essential routines to get a 10x speedup if vector charts
are not initially displayed, or only a 2x speedup if they are.
So now I have 280 milliseconds with raster charts
and 1020 milliseconds with vector charts, down from 2800 milliseconds before.
I would like some feedback to make sure I didn't break anything horribly before making a pull request because of the nature of the changes. Especially useful on slower machines. The startup time in ms is printed in the log file.
Try my fork:
Either master (has some other improvements) or just startup_optimizations branch