Speed up RAT calculations in python#236
Open
MikeSullivan7 wants to merge 6 commits into
Open
Conversation
…TRunner progress (with timings) Cleanup test fixes more test fixes ruff fixes
ruff fixes runner test fixes runner test fixes
0a7b418 to
f34f070
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR aims to reduce the amount of time that RasCAL-2 takes from pressing "run" to displaying the results in the UI. A lot of this time is taken by the overhead of creating the
Processobject in the RATRunner and then runningProcess().start()as there is computing power taken to move data around.This PR moves this overhead time to the startup of RasCAL-2, where it is less noticable to the users. On startup, the
MainWindowPresenterinitialises the RATRunner and starts up the Processes held in a list accessable to the RATRunner object. All of the processes are started but do not actually do anything useful until ago_eventis set. Upon pressing "run", ago_eventsignal is sent to the currently selected process and it begins running the RAT calculation.This change in the RATRunner workflow causes the users experience to be a lot more fluid and the UI is more responsive.
Comparing the times taken to run RasCAL-2 to this PR: (old -> new)
"calculate": 3.52s -> 0.65s
"dream": 11.2s -> 6.7s
"simplex": 5.5s -> 2.8s