High CPU Usage when parsing fails?
See original GitHub issueThis was reported on Slack and I think I found one way to reproduce it reliably, if anyone else can try it out it would be good to have confirmation!
Steps to Reproduce
git clone https://github.com/rtfeldman/elm-spa-example
- Open the project in an editor with the language server enabled.
- Open
src/Main.elm
- Give it a second for the warnings to show up
- Delete from line 1 to line 35 (this block below)
module Main exposing (main)
import Api exposing (Cred)
import Article.Slug exposing (Slug)
import Avatar exposing (Avatar)
import Browser exposing (Document)
import Browser.Navigation as Nav
import Html exposing (..)
import Json.Decode as Decode exposing (Value)
import Page exposing (Page)
import Page.Article as Article
import Page.Article.Editor as Editor
import Page.Blank as Blank
import Page.Home as Home
import Page.Login as Login
import Page.NotFound as NotFound
import Page.Profile as Profile
import Page.Register as Register
import Page.Settings as Settings
import Route exposing (Route)
import Session exposing (Session)
import Task
import Time
import Url exposing (Url)
import Username exposing (Username)
import Viewer exposing (Viewer)
-- NOTE: Based on discussions around how asset management features
-- like code splitting and lazy loading have been shaping up, it's possible
-- that most of this file may become unnecessary in a future release of Elm.
-- Avoid putting things in this module unless there is no alternative!
-- See https://discourse.elm-lang.org/t/elm-spa-in-0-19/1800/2 for more.
- CPU usage will spike to 99% and stay there, even if you undo the changes, it seems like you have to kill and restart the language server.
From taking a profile while this is happening it looks like this is the callstack, it gets stuck somewhere in trying to find a function.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:10 (9 by maintainers)
Top Results From Across the Web
How to fix high Java CPU usage problems - TheServerSide.com
One of the first indicators of a runtime performance problem is a high Java CPU usage report from a JVM profiler or Java...
Read more >large string data parsing causing high-cpu usage
String parsing always generates 100% cpu usage, you are asking it do do real work. Finding out why you lose 40-30% should be...
Read more >CPU usage keeps increasing · Issue #1878 - GitHub
I have this problem too my parse server version is 2.2.17 and its working with 2 core 7gb ram.Also I'm using pm2 but...
Read more >FIX: Internet Explorer may use a high percentage of the CPU ...
Describes a problem in which Internet Explorer may consume a high percentage of the CPU resources after you receive a 404 error message....
Read more >Hunting and Analyzing High CPU Usage in .NET Applications
The one we implemented first was to lock and synchronize access to the dictionary at the cost of losing performance. The server was...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you can, please test with master. I will very likely prepare a release very soon.
Re-enabled for a whole work way, and it works smooth! (VSCode 1.36.1) Deeply appreciated ❤️