Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Extension manager occupys CPU so high when long time loading. #10432

Open
heeroluo opened this issue Jan 22, 2015 · 15 comments
Open

Extension manager occupys CPU so high when long time loading. #10432

heeroluo opened this issue Jan 22, 2015 · 15 comments

Comments

@heeroluo
Copy link

No description provided.

@peterflynn
Copy link
Member

Do you see this animated progress icon for a long time?

extension manager loading

If yes, is the icon animated or is it frozen?
If no, what do you see on the screen while the CPU use is high?

Also -- how long does this high-CPU freeze last for?

@heeroluo
Copy link
Author

Yes, I can see the progress icon. It's animated.
This high-CPU freeze lasts until the extension manager closed.

@peterflynn
Copy link
Member

@heeroluo So just to clarify... does the spinner eventually disappear, and you see the list of extensions in its place? Does CPU use stay high if you leave it sitting there showing the list of extensions? Is it actually frozen -- that is, you're not able to click/scroll inside the Extension Manager popup? If so, how are you closing it?

Also -- what hardware & OS version is your computer?

@heeroluo
Copy link
Author

The CPU stay high only during loading.
I can see the list of extensions. It's not frozen.

My computer is Macbook Pro(Late 2013):
CPU: Intel Core i5 2.4 GHz
Memory: 8 GB
Storage: 256 GB
OS: OS X Yosemite

@peterflynn
Copy link
Member

Ok, so: the CPU use is only high while the loading animation is shown. After the animation is replaced with the list of extensions, CPU use goes back to normal and stays normal until you close Extension Manager. Is that correct?

How long is the loading animation shown?

How high is the CPU usage?

When I first open Extension Manager, Brackets CPU use goes up to 5% for about 4-5 seconds while showing the spinner. I would call that normal behavior. How different are the numbers you're seeing?

@heeroluo
Copy link
Author

Yes, it's correct.
CPU usage up to almost 70% when the loading animation is shown.
cpu-usage
The loading lasts about 1 minute and sometimes fail to load.

@peterflynn
Copy link
Member

@heeroluo, can you try a few more things?

  • Run Debug > Reload Without Extensions in the menu -- does the problem still occur after that?
  • Are you on a Retina display? If so, could you try plugging in a non-Retina external monitor, move the Brackets window entirely onto that screen, and see if the problem still happens?
  • When you say it fails to load entirely -- do you mean the animation just stays there forever? Does it go blank? Do you see an error message? If it does fail entirely, please choose Debug > Show Developer Tools and let us know what messages you see in the Console tab
  • After trying all of the above, you can capture a performance timeline to help us look into the issue further.

Thanks!

@heeroluo
Copy link
Author

  • Reload without extensions -- the extension manager is not available too.
  • Yes, I am on a Retina display. However, the problem still happens after I move the Brackets window entirely onto a non-Retina monitor.
  • When it fails to load(not always), I can see an error message.
  • When I save the timeline data, an error message "Saving files is not enabled in hosted mode." was shown in the console. So I can't get the JSON file.

@redmunds
Copy link
Contributor

I think the problem is that the .spinner class uses transform to dynamically rotate an image. I suspect that it does not perform well on systems that don't have gpu support.

FWIW, the spinner originally used transforms, but I converted it to a sprite sheet for this exact reason, but it looks like @marcelgerber converted it back to a transform in this commit (PR #7304).

@heeroluo
Copy link
Author

By the way, the same problem happens when downloading extension.

@marcelgerber
Copy link
Contributor

@redmunds Oh, I didn't know that. Yeah, I indeed went back from sprites to transforms when we changed it to the Brackets-style spinner.

@heeroluo It's probably enough to post a screenshot of your Timeline tab, but make sure the pie chart on the bottom is visible.
Also, make sure you're using the latest Brackets version - Brackets 1.1 - as it included a major update on the rendering side.

@heeroluo
Copy link
Author

heeroluo commented Feb 1, 2015

Yes, I'm using the Brackets 1.1. The screenshot:
timeline
Steps: Open Brackets > Record -> Open extension manager -> The list of extensions is shown -> Stop recording

@nethip
Copy link
Contributor

nethip commented May 27, 2015

@marcelgerber Did you get a chance to delve more into this issue? From the above pie chart, it looks like scripting is what is reported as the top most area for the slow down.

@marcelgerber
Copy link
Contributor

@nethip You can't really trust the pie chart in this case... it only shows the first 11.1 ms.

Actually, the timeline doesn't look too different from what I get here (Windows 8.1 x64), it's just that downloading (the time before actually processing all those entries, which is the long yellow/blue bar) takes a whole lot longer in your case.

My timeline:
image

@playniuniu
Copy link

I have the same problem with my macbook retina 13 (late 2013),

osx version is 10.11.2 and brackets version is 1.5.0-16538

I thought the cpu 100% problem is due to the logo animation in extension manager

when the animation is stop, cpu useage falls down to normal quickly

So does there have any configuration can disable this animation?

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

7 participants
@heeroluo @playniuniu @redmunds @peterflynn @nethip @marcelgerber and others