vercel / hyper

A terminal built on web technologies
https://hyper.is
MIT License
43.47k stars 3.52k forks source link

Performance + Animation Lags on 3.1.0 (stable) #5754

Open jrodl3r opened 3 years ago

jrodl3r commented 3 years ago

Issue

forced upgrade causes performance lag when using plugins.

joaovbrandon commented 3 years ago

A simple cd Documents take so long... I uninstalled and installed version 3.0.2 and it is normal, but then it updates to the 3.1.0 automatically again and the performance lag continues.

joshsylvester commented 3 years ago

I'm having the same issue (same OS, same version) - I auto-upgraded to 3.1.0 today, and since the upgrade the app has been unusable. The app works fine for 5-10 minutes, and afterward, it is so laggy it's unusable. I type any command into the console - and before executing it takes up 20-30 seconds to display what i had typed. running a normal command (which returns instantly when run in Terminal) can take anywhere up to 2-3 minutes to run.

LabhanshAgrawal commented 3 years ago

Can you try removing all plugins and adding them back one by one, to see if it's due to any particular one. hyper-statusline was causing some issues for me earlier.

stephanschubert commented 3 years ago

hyperline is the culprit here (at least from the list of my plugins).

haljac commented 3 years ago

I'm noticing that after the upgrade, Hyper Helper (renderer) process has very high CPU usage. This seems to be related to my performance issues. After removing hyperline, everything normalized.

industriousparadigm commented 3 years ago

+1, removing hyperline removes the laggy input for me on 3.1.0 running on macOS Big Sur.

radmedov commented 3 years ago

+1 very slow after the upgrade. Downgrade to 3.0.2 resolves the issues

mitchwd commented 3 years ago

+1 Removing the hyper-statusline plugin resolved the issue for me. Ticketed here: https://github.com/henrikdahl/hyper-statusline/issues/96

LabhanshAgrawal commented 3 years ago

@jrodl3r can you post your config again, that link is not working.

LabhanshAgrawal commented 3 years ago

Both hyperline and hyper-statusline are causing issues at the moment, both of these are using setInterval with small values for either getting time, system resources, etc. and spawning child processes very frequently.

RenanSgorlom commented 3 years ago

can confirm after the update hyper-statusline was causing lag, removing it fixes the issue even on hyper 3.1.1 hopefully they fix the issue soon

LabhanshAgrawal commented 3 years ago

Both hyperline and hyper-statusline are causing issues at the moment, both of these are using setInterval with small values for either getting time, system resources, etc. and spawning child processes very frequently.

This along with an issue in electron https://github.com/electron/electron/issues/26143 is giving us the lag.

LabhanshAgrawal commented 3 years ago

Can you all try out the build from https://github.com/vercel/hyper/actions/runs/1049653907 to see if there's any improvement in perf.

bfaulk96 commented 3 years ago

Can you all try out the build from https://github.com/vercel/hyper/actions/runs/1049653907 to see if there's any improvement in perf.

Using Hyper-3.1.0-canary.6-mac-x64.dmg on MacOS Big Sur, this did indeed seem to fix the problem. No lag running the canary version with hyperline enabled 👍 (Edit: So I'm guessing it's pretty much entirely due to https://github.com/electron/electron/issues/26143 and not hyperline's fault, which is good since that repo hasn't seen an update in years 😆 )

joaovbrandon commented 3 years ago

Yep, here the Hyper 3.1.0-canary.6 is ok as well MacOS Big Sur 11.4 👍🏻

LabhanshAgrawal commented 3 years ago

There'd need to be some updates in the plugins though. Doing exec or spawn from renderer is discouraged, it should be done from the main process ideally. Doing it from the renderer is slowly being phased out. The electron issue mentioned that there was some difference between signed vs unsigned builds. The one I'd mentioned earlier is unsigned. Can you try the build from https://github.com/vercel/hyper/actions/runs/1051187521#artifacts too? It's signed and so will help confirm the fix for now.

joaovbrandon commented 3 years ago

@LabhanshAgrawal this last build that you sent (https://github.com/vercel/hyper/actions/runs/1051187521#artifacts) still with the lag when hyper-statusline plugin is enabled 😞

joaovbrandon commented 3 years ago

I'm not sure if something changed from the other build (https://github.com/vercel/hyper/actions/runs/1049653907), but I tested again and this one is fixed...

LabhanshAgrawal commented 3 years ago

@joaaoeu the difference is that one is signed and other isn't. IIRC it's something due to changes in Big Sur. Many electron apps are using codesign --remove .... to remove the signature and fix the performance hit, after users install it. We might also need to do something similar.

LabhanshAgrawal commented 3 years ago

since downgrading electron might not be feasible as the bug is still there in signed builds, we can instead use IPC to do exec etc. in main process. Test out the build from #5803 https://github.com/vercel/hyper/actions/runs/1077170228#artifacts it should be good enough i guess until the issue is fixed in electron.

joaovbrandon commented 3 years ago

With this build it still with a small lag if the hyper-statusline plugin is enabled, but less than the current version.

bfaulk96 commented 3 years ago

I'm seeing the same behavior using that @joaaoeu mentioned when using the hyperline plugin. Less lag, but still quite laggy.

JJJ commented 2 years ago

Not seeing with 3.3.0. OK to close IMO.