pcdshub / lightpath

LCLS Lightpath Module
https://pcdshub.github.io/lightpath
Other
4 stars 9 forks source link

PERF: remove hinted signals from LightRow widgets #157

Closed tangkong closed 2 years ago

tangkong commented 2 years ago

Description

Motivation and Context

In the quest for a faster lightpath, we found that walking and creating the signal widgets on the main screen incurred a significant time loss. The detailed screens still exist for allowing users to control their devices from lightpath.

As measured from the command line (time python -m lightpath --hutches XCS) Before this PR: ~90s After this PR: ~30s

This also lets us benefit from Zach's ophyd performance PR, since we are no longer waking up each device at lightpath startup.

This does come with the caveat that opening detailed screens for the first time will be significantly slower. We are essentially deferring the acquisition of that resource until later.

How Has This Been Tested?

interactively

Where Has This Been Documented?

This PR

image
tangkong commented 2 years ago

CI failed once but passed on a re-run. Hoping that tagging typhos will make that more consistent.

ZLLentz commented 2 years ago

Just as an idea for a follow-up for what to do with the space, what if we extend like:

@dataclass
class LightpathState:
    inserted: bool
    removed: bool
    transmission: float
    output_branch: str
    state_summary: str = ""

And then devices can provide text to lightpath to include in a label. Just a small idea, there are probably better ways to do this.

klauer commented 2 years ago

state_summary sounds nice - agreed about that label.

tangkong commented 2 years ago

I'll toss the state_summary idea into an issue. 👍