Neovide: Start speed in macos is slow

Created on 17 Mar 2020  路  12Comments  路  Source: Kethku/neovide

It takes 3 seconds until ready to use.

Anyway, the whole user experience is very good, except this lag.

bug

Most helpful comment

with the new optimizations #238 Neovide startup time on MacOS is down from 2.8-3s to 750~900ms with emojis, It isn't optimal yet but a significant improve nonetheless. I suggest not closing this yet as i have some more optimizations in mind that may bring this number to ~200-300ms which would be near instant, and comparable to windows/linux

All 12 comments

platform pls

macos catalina 10.15.3, i7.

this is due to font loading. Can you try building without the embedded fonts feature and see if that helps? Font fallback will be worse but we are working on addressing that. Also you'll need a guifont configured in your configs

Compile without embedded fonts, speed don't change. I use the Fira Code font.

This is probably my only criticism of this GUI as well. I sometimes change back to nvim-qt because of the startup lag. Otherwise it's brilliant.

I'm on the exact same OS (macOS catalina 10.15.3)

Oh I should mention also that it takes around 3 seconds for me as well

I don't have a mac. Any chance I could convince one of you folks to do a little profiling to see what is taking all the time? I believe it has to do with font loading on Mac because neovide starts up nearly instantly on Windows, but I can't be sure. I don't have a Mac to test it myself.

https://github.com/geerlingguy/macos-virtualbox-vm, can also help you to keep running unittest.

@Kethku I am running macOS Mojave and having same issue, 2~3 sec startup time, i have ran some time profiling and here's probably the two calls responsible for the delay, particularly caching_shaper::add_font_to_collection_by_name

image

Yup it's definitely add_font_to_collection_by_name tried to return None from it and neovide loads almost instantly

Further digging, turns out to be emoji loading @ caching_shaper:121

    if add_font_to_collection_by_name(SYSTEM_EMOJI_FONT, &source, &mut collection).is_none() {
        #[cfg(feature = "embed-fonts")]
        {
            if cfg!(not(target_os = "macos"))
                && add_asset_font_to_collection(EMOJI_FONT, &mut collection).is_some()
            {
                info!("Fell back to embedded emoji font");
            } else {
                warn!("Could not load emoji font");
            }
        }
    }

Awesome investigation. This gives me a lever to push. I'll fiddle with it and report back

with the new optimizations #238 Neovide startup time on MacOS is down from 2.8-3s to 750~900ms with emojis, It isn't optimal yet but a significant improve nonetheless. I suggest not closing this yet as i have some more optimizations in mind that may bring this number to ~200-300ms which would be near instant, and comparable to windows/linux

I'm going to close this for now as it is back in reasonable ranges.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ABitMoreDepth picture ABitMoreDepth  路  25Comments

deisi picture deisi  路  28Comments

habamax picture habamax  路  67Comments

reisub0 picture reisub0  路  39Comments

khalidchawtany picture khalidchawtany  路  23Comments