Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fully backgrounded figure write tasks #9

Open
thclark opened this issue Jul 26, 2020 · 0 comments
Open

Fully backgrounded figure write tasks #9

thclark opened this issue Jul 26, 2020 · 0 comments
Labels
feature-proposal A proposed feature for discussion performance Changes to improve performance

Comments

@thclark
Copy link
Owner

thclark commented Jul 26, 2020

Figure write-to-disk is called as an async task, so it doesn't block the main computation thread.

That significantly speeds up execution for scenarios where you have other computation to proceed with (e.g. a flow solver where you're printing out monitor charts each timestep, but don't want to pause execution of the main solution to serialise all that json to figures).

However, figure writing is still done within the main background thread, so the program execution can never be quicker than the length of time required to write the figures. In most cases this is fine, but if you want the main program to execute then return quicker than the figure writes, that could be a problem.

Consider creating daemonised threads for writing figures so the task is (optionally) offloaded and may or may not be completed after program execution ends.

Votes and +1s, anyone??

@thclark thclark added feature-proposal A proposed feature for discussion performance Changes to improve performance labels Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-proposal A proposed feature for discussion performance Changes to improve performance
Projects
None yet
Development

No branches or pull requests

1 participant