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

ENH: Add splash for coreg gui #10412

Merged
merged 6 commits into from
Mar 5, 2022
Merged

Conversation

larsoner
Copy link
Member

@larsoner larsoner commented Mar 4, 2022

The coreg gui loads a lot of stuff -- it takes 3-4 sec to come up on my system (see below). This PR adds a splash screen so that the user knows that something is happening:

Peek.2022-03-04.09-52.mp4

@hoechenberger if you agree this is good, I could make a quick proper MNE splash screen, since the one here is just a placeholder. Maybe the MNE logo on a white background with rounded corners?

cc @marsipu in principle you could use this for mne-qt-browser, too, but your GUI always comes up very quickly so I don't think it's necessary...

@marsipu
Copy link
Member

marsipu commented Mar 4, 2022

@larsoner This looks great.
Maybe we can add this to mne-qt-browser when we implement command-line support via mne browse_raw.
(EDIT: Starting up the python interpreter will probably add a bit to startup time, right?)

@larsoner
Copy link
Member Author

larsoner commented Mar 4, 2022

mne browse_raw

This already works since it's just a backend thing:

Peek.2022-03-04.10-57.mp4

By my estimation it's about 2.5 sec from start until it shows up:

Peek.2022-03-04.10-57.mp4

(EDIT: Starting up the python interpreter will probably add a bit to startup time, right?)

Yes, that and a Qt application. But unfortunately, both of these have to complete before the splash is shown. So really it's useful if displaying the window itself is the slow part. Looks like it does at least show up if I add it to mne-qt-browser:

Peek.2022-03-04.11-01.mp4

@hoechenberger
Copy link
Member

hoechenberger commented Mar 4, 2022

Nice work, @larsoner!

Can we make the splash screen

  • larger and
  • a square or rectanlge?

And it shouldn't obfuscate the entire screen

e.g.

image

@larsoner
Copy link
Member Author

larsoner commented Mar 4, 2022

How about:

Screenshot from 2022-03-04 11-54-38

@larsoner larsoner marked this pull request as ready for review March 4, 2022 17:05
@larsoner larsoner added this to the 1.0 milestone Mar 4, 2022
@agramfort
Copy link
Member

looks great !

@larsoner
Copy link
Member Author

larsoner commented Mar 4, 2022

@GuillaumeFavelier feel free to merge if you're happy. @hoechenberger we can always improve the splash image in follow-up PRs!

@GuillaumeFavelier
Copy link
Contributor

wait 3000 additions? I have to look.

@larsoner
Copy link
Member Author

larsoner commented Mar 4, 2022

That's just the .qrc. Feel free to generate on your system and push, in theory there should be fewer lines changed that way since I think you generated the last one

@GuillaumeFavelier
Copy link
Contributor

oh. resources.py of course

@hoechenberger
Copy link
Member

@larsoner Amazing work, I love it!

@hoechenberger
Copy link
Member

wait 3000 additions? I have to look.

Well, Eric's been busy, you see! 🤣

Copy link
Contributor

@GuillaumeFavelier GuillaumeFavelier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works great for me 👌 !

@GuillaumeFavelier GuillaumeFavelier merged commit a93c198 into mne-tools:main Mar 5, 2022
@GuillaumeFavelier
Copy link
Contributor

Thank you @larsoner

@hoechenberger
Copy link
Member

hoechenberger commented Mar 5, 2022

Speaking of visual feedback while we're doing something: mme sys_info easily takes 20, 30 seconds on my computer and sometimes a minute or even several minutes (!) on certain network-based installs I'm using. And I think on my M1 Mac it took about 3 minutes to return anything in the first run (through Rosetta 2). Any chance we could at least let users know that we're still alive there?
Additionally to all those imports, sometimes Matplotlib starts happily recreating its font caches which takes additional time. 🤦‍♀️

@GuillaumeFavelier
Copy link
Contributor

Do you think a progress bar in the terminal would help?

@larsoner
Copy link
Member Author

larsoner commented Mar 5, 2022

I think it's a bit of a corner case in that users will typically not hit because vtk and mpl are super slow for their first import (only). You hit it as a dev using CIs because they have fresh envs all the time. So I'd rather not make this a lot more complicated.

One easy change is to make outputs incremental as we accumulate each bit of information. The way it works now, we construct the whole string and then print it all at once. Doing it incrementally will also add a tiny hint of information, namely what takes so long.

@larsoner larsoner deleted the splash branch March 5, 2022 13:24
@larsoner
Copy link
Member Author

larsoner commented Mar 5, 2022

... I can make a quick PR for this today

@GuillaumeFavelier
Copy link
Contributor

One easy change is to make outputs incremental as we accumulate each but of information

This sounds reasonable to me, what do you think @hoechenberger ?

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