UBC-Thunderbots / Software

Robot Soccer Playing AI
http://www.ubcthunderbots.ca
GNU Lesser General Public License v3.0
53 stars 110 forks source link

Speed up Thunderscope launch time #3209

Closed nimazareian closed 4 months ago

nimazareian commented 4 months ago

Description

For the past few months I have been noticing that often Thunderscope takes noticeably longer to launch compared to before. After using git bisect (pretty useful tool for tracking down regressions that I just learned about) I was able to narrow down the problem to #2788 where the sync_simulation function was refactored that added up to 6 seconds to the launch time on my PC.

There were two other smaller changes that I also included in this PR. One was removing an extra window.show() call for Thunderscope, and another being how large the widgets are at launch time of Thunderscope.

Testing Done

Measured the time between self.window.showMaximized() call and pyqtgraph.exec() across multiple commits to verify the issue, then I verified that the time reduced from 6-8 seconds to 0.3-1 second.

Resolved Issues

Length Justification and Key Files to Review

Review Checklist

It is the reviewers responsibility to also make sure every item here has been covered

Mr-Anyone commented 4 months ago

On my end, this is definitely faster than upstream.