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

[Windows] 1s pause on empty window after opening file from command line #249

Open
crabmusket opened this issue Feb 19, 2024 · 5 comments
Open
Labels
C-bug Category: Something isn't working P-windows Platform: windows

Comments

@crabmusket
Copy link

crabmusket commented Feb 19, 2024

Platform:

Processor	Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz   2.59 GHz
Installed RAM	32.0 GB (31.8 GB usable)
Edition		Windows 11 Pro
Version		22H2
OS build	22621.3155
Experience	Windows Feature Experience Pack 1000.22684.1000.0

Installation method:

> cargo install inlyne
> inlyne --version
inlyne 0.4.0

Issue:

When opening even a tiny markdown file from PowerShell, there is a 1-1.5s pause on a blank window which gives a "busy" spinning cursor.

explorer_Kb3TIbZMaZ.mp4

I'm happy to try to find out more information when I have time. I'm not used to debugging software on Windows (I do most of my work in WSL) so would love suggestions!

Let it be said - the instant window opening speed is lovely!

@CosmicHorrorDev CosmicHorrorDev added the C-bug Category: Something isn't working label Feb 19, 2024
@CosmicHorrorDev
Copy link
Collaborator

Thanks for opening an issue!

Can you try explicitly setting the font families in inlyne's config file to see if that speeds things up at all?

[font-options]
regular-font = "..."
monospace-font = "..."

@crabmusket
Copy link
Author

Added this to config.toml:

[font-options]
regular-font = "Arial"
monospace-font = "Consolas"

And running inlyne -c config.toml title.md I don't see any speedup.

I'm going to try compiling from source and doing some good old print debugging this weekend!

@crabmusket
Copy link
Author

crabmusket commented Feb 26, 2024

I've done some print-profiling and it seems that this block is the one that takes all the time. Everything else seems pretty much instant.

inlyne/src/renderer.rs

Lines 69 to 72 in d134028

let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
dx12_shader_compiler: wgpu::Dx12Compiler::Fxc,
});

Research:

@CosmicHorrorDev
Copy link
Collaborator

Thanks for helping narrow things down. Unfortunately I'm not sure what the best thing for us to do is here 😅

You can try reporting things upstream to wgpu or asking in one of their help channels, since they'll be way more equipped to handle these kinds of things

@crabmusket
Copy link
Author

Yep, will do and report back. If that Reddit reply is accurate it may be out of your hands entirely.

I guess maybe the only possible thing to do would be to render a loading indicator in the window, so it's not just a busy cursor? But that would probably involve rearranging the code a fair bit for a very small aesthetic improvement on a single platform.

@CosmicHorrorDev CosmicHorrorDev added the P-windows Platform: windows label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Something isn't working P-windows Platform: windows
Projects
None yet
Development

No branches or pull requests

2 participants