adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.26k stars 7.63k forks source link

Extension Manager takes 42 seconds to load, on average #11657

Open fbracht opened 9 years ago

fbracht commented 9 years ago

Brackets has been taking almost literally forever to load the Extension Manager. While it loads, you can't do anything with it, not even interrupt the loading process to get back to work. It just sits showing this animation: screen shot 2015-09-02 at 6 07 07 am

Using a stopwatch, I started opening and closing it repeatedly on an mostly empty project (just 1 file) to time how long it would take to load every time. I got the following load times: 45s, 39s, 31s, and 48s.

These were the extensions I had installed during this test:

I decided to uninstall a few to see whether it would have any impact. I got rid of Brackets Git, Brackets Wordpress Hint, and PHP Syntax Hint. This didn't have any effect, as when I timed four more times, I got 38s, 40s, 40s, and 55s.

In short, I can say the Extension Manager has been taking an average of 42 seconds to load, making Brackets unusable during this time.

(I am on a mid-2014 Macbook Pro Retina)

ingorichter commented 9 years ago

I assume, that you did your experiments in the same session without restarting Brackets? I worked on a fix to improve the experience (https://github.com/adobe/brackets/tree/ingo/optimize-registry-loading). The idea is to compare the local copy of the registry with the one available from the extension registry server. This will improve the behavior significantly. One other aspect might be a slow network connection. On the other hand, the size of the registry json file is ~1MB and will be transferred gzipped. The question is if this is the bottleneck or the processing of the data to populate the extension manager dialog. This can only be answered by doing some performance measurements.

fbracht commented 9 years ago

I assume, that you did your experiments in the same session without restarting Brackets?

Correct.

As for network speed, I don't believe it's the problem in my case. I don't have fiber or anything, but it's a strong enough connection for buffer-free HD video streaming.

As for the fix you mentioned, I'm sorry, but you meant that I should download and install it, or you're just letting me know a fix is coming to the actual product on an update?

ingorichter commented 9 years ago

I just wanted to let you know that there is a possible fix to improve your situation. You can give it a try, if you want to. Regarding the network speed: downloading a 1MB file shouldn't take too long. Downloading the registry with curl on my machine with curl -o reg.json.gz https://s3.amazonaws.com/extend.brackets/registry.json takes 1 sec.

Downloading the registry from within Brackets takes less than 1sec (looking at the network traffic tab in Chrome devtools).

The rendering takes around 3 secs on my machine. This might be slow on your machine too.

ghost commented 7 years ago

This is still an issue. I spend close to a minute loading the extension manager.

The mention of GZIP, then computers ( Like mine ) that are very busy or have a poor CPU, are going to take time / struggle unzipping.

The times i have opened the extension manager, it was not because i needed the registry or wanted to install anything remotely. Could it be an idea to not load the remote packages and library at all when opening the manager, and rather let the user choose to download such file in the appropriate tabs?

Bracket's is a simple concept that is easy to execute, there is no specific reason Bracket's is going to be one of those modern apps that barely does anything, but still takes GB in size along with massive CPU and RAM usage (Spotify is a perfect example of the simplest app that hog resources for no reason). Things like this specific issue, is one of many reasons apps seem to be very very slow on older or less performing CPUs.