Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Pressing enter for long cause CPU to shootup 100% #3563

Closed
v3ss0n opened this issue Sep 17, 2014 · 16 comments
Closed

Pressing enter for long cause CPU to shootup 100% #3563

v3ss0n opened this issue Sep 17, 2014 · 16 comments

Comments

@v3ss0n
Copy link

v3ss0n commented Sep 17, 2014

Performance regression while entering new lines.
After 2-3 secs CPU will shoot up to 100% of pressing and holding enter.
Tested with --safe, after about 1000 lines Atom gives up , quit with a crash.
Also tested with auto-save turned off.

@batjko
Copy link
Contributor

batjko commented Sep 17, 2014

I assume you got really angry at your code?

@v3ss0n
Copy link
Author

v3ss0n commented Sep 18, 2014

Lol no. I saw a little lag while inserting new line so tested.
It dosent happen on Ace editor or code mirror.

@batjko
Copy link
Contributor

batjko commented Sep 18, 2014

I think large buffers still pose some problem, and 1000 lines may start to hit some ceilings, although I'm not sure.
@kevinsawicki I think this is part of the whole large files shenanigans, being looked at in #307?

@lee-dohm
Copy link
Contributor

@batjko 1000 empty lines shouldn't be a big deal, that would be less than 1K (2K on Windows because of the different line endings).

@batjko
Copy link
Contributor

batjko commented Sep 18, 2014

I know it won't make the file big enough to matter, but I wonder if the number of lines has an impact on buffer handling somewhere in the same vein?

Otherwise, maybe something with some keytroke or command cache filling up?

And yes, I'm just throwing words into the ring now.

@v3ss0n
Copy link
Author

v3ss0n commented Sep 19, 2014

I tried with all the window splits being closed , and theres no problem.
But when i open 4 editor splits like this , there is performance problem (even in safe mode):
my_latest_mod

@kevinsawicki
Copy link
Contributor

@v3ss0n Could you profile it?

Open the dev tools, click the profiles tabs, select Collect JavaScript CPU Profile, and click Start.

Then perform the actions in the editor, once you've hit the problem, hit stop, then take a screenshot.

@v3ss0n
Copy link
Author

v3ss0n commented Sep 19, 2014

Ok i will see

@kevinsawicki
Copy link
Contributor

@v3ss0n I updated my previous comment, I hit the comment button before finishing all the steps, sorry.

@v3ss0n
Copy link
Author

v3ss0n commented Sep 19, 2014

https://gist.github.com/v3ss0n/821db315a149eb878954

I tested with 129 build , which i updated yesterday , on this build , CPU shoots up 100% But it dosen't stay up there , and no more crashed. Latest master is also pulling , will test and report again.

@v3ss0n
Copy link
Author

v3ss0n commented Sep 19, 2014

@kevinsawicki
Tested on latest master commit , same performance with 129 , no crashing , tested up to 5k lines. CPU tho , hits 112 %+ , on 129 and 130 versions , i notice Atom uses more than 1 CPU? is that true? Multi processing by default?

One thing i noticed: when Same document is opened in different split , either it is focused or not , it takes huge performance hit when entering new line.

@v3ss0n
Copy link
Author

v3ss0n commented Sep 22, 2014

Anything new on this?

@v3ss0n v3ss0n closed this as completed Sep 30, 2014
@v3ss0n v3ss0n reopened this Sep 30, 2014
@v3ss0n
Copy link
Author

v3ss0n commented Sep 30, 2014

Accidentally closed , CPU still hits > 100% as of latest commit , 443df29
But a lot more responsive, no longer sensible lag on repeatedly entering new lines. I also noticed change in undo behavior . Before undo is so grandular that even a single char change is recorded in undo history but now in batches , may be this change Improved responsiveness.

So , shall we consider this partially fixed?

@damieng
Copy link
Contributor

damieng commented Nov 21, 2016

Going to close this as there's been no additional reports/commentary on this for 2 years.

@damieng damieng closed this as completed Nov 21, 2016
@v3ss0n
Copy link
Author

v3ss0n commented Nov 22, 2016

It was gone since 1.x releases thanks.

@lock
Copy link

lock bot commented Apr 4, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

@lock lock bot locked and limited conversation to collaborators Apr 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants