Screentogif: [Performance Request] About starting speed

Created on 9 Feb 2018  ·  10Comments  ·  Source: NickeManarin/ScreenToGif

Recent versions of the ScreenToGif are starting more and more slowly, even as long as 15 to 20 seconds in my PC.

I miss the starting speed of the early version, and just tested, ScreenToGif v1.4.1, the first version I used in 2015, can start with only 1 second.

Of course, I understand that the more powerful the feature, the performance will inevitably be reduced, however, just a little hope, is it possible to optimize the starting speed? Thanks.

⏳ waiting for answer

Most helpful comment

Update: Replacing

            if (Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor == 1)
            {
                try
                {
                    var search = new ManagementObjectSearcher("SELECT HotFixID FROM Win32_QuickFixEngineering WHERE HotFixID = 'KB4055002'").Get();
                    Global.IsHotFix4055002Installed = search.Count > 0;
                }
                catch (Exception ex)
                {
                    LogWriter.Log(ex, "Error while trying to know if a hot fix was installed.");
                }
            }

with

Global.IsHotFix4055002Installed = false; // Might be different on your system

fixed this issue. Startup is now < 1s again.

All 10 comments

I think you should write your PC info

For me - the latest version starts for about 1 second. Ultra fast.

@user3323 Thank you for your reply.
ScreenToGif v2.12 + Win7 SP1 x64 + SATA HDD + .NET 4.7

I can't assert that my PC is not a negative factor, maybe it's indeed too old (bought in 2013). I'm just saying, the same PC, same repro steps, v1.4.1 only need 1s to start, while v2.12 need much much longer (both are the time of the first start after PC boot)

Here is the v1.4.1 portable link in case someone want to test:
https://github.com/waldens/waldens.github.io/raw/master/ScreenToGif.exe
Their startup time are both within 1s in you guys PC?

The app was taking 5 seconds to load with this low-end PC:
i3 5th gen, 4GB DDR3, SATA HDD, Win 10 without any dedicated graphics card.

I'm curently changing how the app starts and closes, so I'll run a performance test later.
Thanks for the feedback.

I'm on Windows 7 with the lastest updates and .NET 4.6.2. + dual processor top of the line XEON CPU and for me the startup of version 2.13.1 takes easily over 30s during which no feedback about the startup process is given, at all.

Is it possible that this is connected with the fact that I am behind a HTTP proxy?

I got the current source and did a little digging, seems that the issue lies in getting the status of an installed hotfix in App.xaml.cs -> Application_Startup:

            if (Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor == 1)
            {
                try
                {
                    var search = new ManagementObjectSearcher("SELECT HotFixID FROM Win32_QuickFixEngineering WHERE HotFixID = 'KB4055002'").Get();
                    Global.IsHotFix4055002Installed = search.Count > 0;
                }
                catch (Exception ex)
                {
                    LogWriter.Log(ex, "Error while trying to know if a hot fix was installed.");
                }
            }

When compiled with Debug Configuration, ´search.Count´ took 52s for me.

Update: Replacing

            if (Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor == 1)
            {
                try
                {
                    var search = new ManagementObjectSearcher("SELECT HotFixID FROM Win32_QuickFixEngineering WHERE HotFixID = 'KB4055002'").Get();
                    Global.IsHotFix4055002Installed = search.Count > 0;
                }
                catch (Exception ex)
                {
                    LogWriter.Log(ex, "Error while trying to know if a hot fix was installed.");
                }
            }

with

Global.IsHotFix4055002Installed = false; // Might be different on your system

fixed this issue. Startup is now < 1s again.

@Sethur Thank you for finding out what was slowing down ever more the startup. I'll fix it.

Still, for @waldens, the app was slower even before this Hotfix detection code was added.

Any news on how fast the app starts now for you?

@NickeManarin Less than 2s, this issue can be closed. Thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spyoungtech picture spyoungtech  ·  4Comments

ghost picture ghost  ·  4Comments

alphestdev picture alphestdev  ·  4Comments

duarteframos picture duarteframos  ·  3Comments

daniloalonso picture daniloalonso  ·  5Comments