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

Inspector now uses the app manager to open autoplot windows #359

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

pfafflabatuiuc
Copy link
Contributor

Inspectr now uses the app manager to open new autoplot window in separate process.

@wpfff
Copy link
Contributor

wpfff commented Dec 8, 2022

@astafan8 and @jenshnielsen would one of you be able to have a look at this?
we have been working a bit on launching plots more robustly. they are now each running in a separate process, which solves #298 rigorously and will make some other features we have in mind easier to implement (like #240 for example).

it works great as is in our lab on monitr, but this PR is also moving this to inspectr. but since we don't use the qcodes database here it'd be great to get your opinion.

@jenshnielsen
Copy link
Collaborator

Thanks @pfafflabatuiuc and @wpfff I will try to have a look asap

@wpfff
Copy link
Contributor

wpfff commented Dec 8, 2022

great, thanks! no immediate rush, but definitely looking forward to hear your opinion.

@astafan8
Copy link
Collaborator

@wpfff i've tested it just now, it seems to work, and indeed launches separate processes per plot and all.

however opening a new plot window is noticable slower that with the original implementation (say 1-2s vs 5s on my machine). i did not profile the code, but perhaps it's the price to pay for launching a separate process and all. Did you notice a slowdown when you migrated to the app manager?

@jenshnielsen for info

@wpfff
Copy link
Contributor

wpfff commented Jan 21, 2023

interesting, thanks for having a look @astafan8 -- we can have a closer look at that. i think for our non-qcodes db backend i didn't notice that.
plus we started migrating a lot of measurement machines to linux, where i in general had the feeling things are pretty snappy.

@marcosfrenkel could you have a look how speed compares for you between the old and new way? (both qcodes/hdf5 backends, and maybe also linux vs windows?)

@marcosfrenkel
Copy link
Collaborator

marcosfrenkel commented Jan 26, 2023

@astafan8 @jenshnielsen It seems like the slowdown is the price you pay for starting new processes. Trying it with monitr and ddh5 files, no matter what way you use to start a new process with autoplot (from a terminal or an app) there is a slowdown when starting the new process and loading the data than doing it in the same process.

I tested a few different combinations and it seems like on my computer with using matplotlib it takes somewhere about 1~1.5 seconds extra to open a new process instead of plotting it in the same one. The new process slowdown is bigger for the Qcodes database than the ddh5 files we use though.

@wpfff
Copy link
Contributor

wpfff commented Jan 29, 2023

we here currently think this is acceptable (the fact that each plotting window has its own process makes the entire app more robust and each autoplot window a bit faster).

But before merging it'd be great to get an explicit OK @jenshnielsen and @astafan8 :)

It would of course also be possible to make this optional through a user setting.

@jenshnielsen
Copy link
Collaborator

@wpfff Will do some real world testing and come back to you

@wpfff
Copy link
Contributor

wpfff commented May 23, 2023

@jenshnielsen did you ever manage to look at this?

# Conflicts:
#	plottr/apps/autoplot.py
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.

5 participants