Skip to content

Speed up RAT calculations in python#236

Open
MikeSullivan7 wants to merge 6 commits into
RascalSoftware:mainfrom
MikeSullivan7:exploring_process_pool_rat_runner
Open

Speed up RAT calculations in python#236
MikeSullivan7 wants to merge 6 commits into
RascalSoftware:mainfrom
MikeSullivan7:exploring_process_pool_rat_runner

Conversation

@MikeSullivan7

@MikeSullivan7 MikeSullivan7 commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

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 Process object in the RATRunner and then running Process().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 MainWindowPresenter initialises 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 a go_event is set. Upon pressing "run", a go_event signal 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

@MikeSullivan7 MikeSullivan7 force-pushed the exploring_process_pool_rat_runner branch from 0a7b418 to f34f070 Compare June 30, 2026 15:11
@MikeSullivan7 MikeSullivan7 marked this pull request as ready for review June 30, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant