hyper icon indicating copy to clipboard operation
hyper copied to clipboard

Why is Hyper startup slow on Windows?

Open reaCodes opened this issue 6 years ago • 27 comments

  • OS version and name: Windows 10 17134.1
  • Hyper.app version: 2.0.0

Issue

Why is Hyper startup slow on Windows? CMD is the fastest, then is PowerShell. But Hyper is slow than PowerShell. On my laptop, Hyper takes 4 seconds to startup.

Are there some ways to speed up Hyper?

(Note: I am talking about the speed of startup, not the speed of other aspects. In other areas, they have little difference in speed.)

reaCodes avatar May 05 '18 10:05 reaCodes

I think it's just an electron thing. With modern desktops having lots of RAM, I'd love an option for hyper to close to the tray but stay in memory. I habitually close things when I don't need to.

dlynchcodes avatar May 08 '18 16:05 dlynchcodes

So it starts slowly, and it's true

reaCodes avatar May 09 '18 02:05 reaCodes

Help is welcome to improve it @reaCodes 👍 There's lots of things that could be improved in the startup process.

On my Macbook it opens in 2 seconds (cold start with plugins), while the built in terminal opens in about 1 second, I don't think that's slow.

I wonder why you're seeing 4 seconds, do you have any plugins installed? What CPU do you have?

albinekb avatar May 09 '18 10:05 albinekb

me too my cpu is i5-8250u 8g ram nvme ssd window10 1703 also start slow(about 4 s)

jinxw avatar May 11 '18 03:05 jinxw

Because of the startup time, I still often use CMD and PowerShell

reaCodes avatar May 11 '18 04:05 reaCodes

What did you expect from an Electron app

qexk avatar Jun 26 '18 08:06 qexk

@albinekb - check out the following gist - it seems this may help? https://gist.github.com/paulcbetts/da85dd246db944c32427d72026192b41

p-sherratt avatar Jul 23 '18 11:07 p-sherratt

WebTorrent and VS Code starts faster than their most famous contenders, @Aksamyt ... It is not an Electron issue.

leodutra-aurea-zz avatar Jul 30 '18 22:07 leodutra-aurea-zz

@p-sherratt apologies for the stupid question, but for a non-JS dev, where would that gist go (for a Hyper install on Windows)? Top of resources/bin/cli.js? Very happy to try it and report back .

Given that the install of Hyper isnt likely to change during the process of starting, this does seem like a sensible optimization. We are seeing much higher startup latencies on high end hardware; I suspect partly because our "My Documents" is a network share and even offline there is some additional latency on the Windows side. We do not see these latencies with software like Chrome.

daviesalex avatar Aug 05 '18 10:08 daviesalex

+1

doublemcz avatar Sep 13 '18 18:09 doublemcz

Any updates on this (including @daviesalex's question)? I would love to use a good looking terminal emulator. But a startup time of 3-5s on my system is unacceptable as I only need a couple of seconds for most of my tasks before I close the terminal again.

My hardware: i7-6800k @ 4.1ghz GTX 1080Ti 32gb DDR4 RAM M.2 SSD Windows 10 Pro 17763

Dimension4 avatar Nov 06 '18 23:11 Dimension4

+1

FMGordillo avatar Nov 21 '18 05:11 FMGordillo

Any progress on this? Running on a top-of-the-line machine and it still takes 3 to 4 seconds...

UltraCakeBakery avatar Jan 15 '19 12:01 UltraCakeBakery

I believe it has to do with plugins. If you have the plugins you use loaded locally rather than every time you start hyper it tries to update them it will load much quicker. Anyone want to test my this I need to load up hyper and try it but I believe that is what I had done in the past to speed up the load time. I think it will speed up the load time significantly.

thebadhatter avatar Jan 16 '19 12:01 thebadhatter

It's not related to plugins. I've got no plugins installed and my PC is running on a $600+ CPU from Intel and still, Hyper starts slow. (And Hyper executable files are installed on a M.2 SSD) https://streamable.com/n51ch

ghost avatar Jan 24 '19 23:01 ghost

Loading personal and system profiles took 1289ms. ~ $

Is how long mine takes, So I can relate. It used to take much longer for me. (exact amount of time I do not remember.)

I'd like to find out at what point what is taking so long to load as well.

thebadhatter avatar Jan 27 '19 18:01 thebadhatter

Does Hyper use V8 snapshots? If not, that would probably help.

glen-84 avatar Feb 04 '19 09:02 glen-84

Does Hyper use V8 snapshots?

FYI I have a branch with v8 snapshots but didn't see any significant improvement on Linux. I need to set up a windows VM and test it there.

If anyone wants to try it on windows, I can publish it later today

juancampa avatar Feb 04 '19 14:02 juancampa

It is due to session being created and after the windows since we attach the session to the window. This can be optimised by detaching the pty and session from the creation as having a RPC binding between the two, This way we can open the UI while the session is not yet created and attach it once it's ready.

ppot avatar Feb 04 '19 15:02 ppot

It is due to session being created and after the windows

@ppot this should help then: https://github.com/zeit/hyper/pull/3352, it's in the 3.0.0 canary build if you want to test it

juancampa avatar Feb 04 '19 15:02 juancampa

Look faster on canary. Would need to metrics the boot time of the app. but it's faster indeed.

ppot avatar Feb 04 '19 16:02 ppot

Test from console.

Canary 3.0.0-stable6

  1. One new window
    • test 1 : total init time 180.20000000251457
    • test 2 : total init time 150.69999999832362
  2. Invoke two new windows
    • First : total init time 188.90000000828877
    • Second : total init time 153.69999999529682.

stable release 2.1.2

  1. One new window
    • test 1 : total init time 493.93
  2. Invoke two new windows
    • First : total init time 475.395
    • Second : total init time 503.905

Total Rounded MS for 3 windows: Canary 3.0.0-stable6 : 523ms stable release 2.1.2 : 1.473ms

Startup speed acceleration: stable release 2.1.2 / Canary 3.0.0-stable6 = 2.816

Disclaimer: Based on theses metrics, it is clear the the startup of the canary is faster then the latest stable, Optimistic session creation from #3352 helped optimising the startup of 281.64%. Note: This stats is based on three windows in order to get some different metrics. To have a better metric it would implify having multiple test case of window startup such have different panes layer set.

@juancampa I will close this for now and if other complaints, we can investigate more.

ppot avatar Feb 06 '19 13:02 ppot

Looks promising, but shouldn't this remain open until the release is available?

glen-84 avatar Feb 06 '19 14:02 glen-84

Leave it open until the release is there please.

ghost avatar Feb 07 '19 14:02 ghost

Will keep it open until release

ppot avatar Feb 08 '19 00:02 ppot

Canary 3.0.0 c8 startup cost 3 ~4 s

eromoe avatar Mar 28 '19 08:03 eromoe

Any new information about a release date?

desplodur avatar Nov 04 '22 11:11 desplodur