How do you create google chrome extensions?

Why do Google Chrome Extensions keep running even when they aren't in use?

  • Checking the about:memory in Google Chrome shows the memory usage of all running extensions. Weird to see them using the memory even when they aren't being used. Shouldn't there be a suspended state for them or something similar to limit memory consumption and improve battery life in a netbook for example? Maybe we could have extensions in the 'not running' state, until we need them, and only launch any code, when user clicks on their button or trigger them otherwise, explicitly?

  • Answer:

    Good observation. You're right that shutting down idle extensions would be a good optimization, and it's something we'd like to add soon. Update: Today, we posted to the Chromium blog about Event Pages, which address this problem: http://blog.chromium.org/2012/06/put-your-extensions-on-diet-with-event.html

Aaron Boodman at Quora Visit the source

Was this solution helpful to you?

Other answers

As someone already mentioned, this is due to the fact that some extensions are build with background pages or scripts support. Those usually include extensions that need real-time updates, such as RSS feeds or counters of unread items. The use of background pages isn't recommended unless there's real need for such, as too many extensions with "background"-s slow down the browser.

Pepe Manshon

Because the extensions are either... badly coded ( having memory leaks ), doing some precalculation for faster performace later on ( like updating a database of websites to ban ), involved in something shady ( collection your browsing behaviour data). As it has already been mentioned in other answers, Event Pages should be used for better performanc instead of Background Pages. But despite that, Event Pages are also capable of eating up memory, just as Background Pages can be very efficient in that regard.

Vlas Bashynskyi

Here's Chrome's help article on 'Background pages/apps' http://support.google.com/chrome/bin/answer.py?hl=en&answer=1184722 I think some extensions are needed in 'running' state all the time because of the function they perform. Like the example of Gmail extension they have given in the article..

Mahak Swami

They take up browser memory because, they are there. Sort of like having Visual Studio on your computer but not actually running it. I am just guessing here. I like Jorge's idea. We should put more research into it. However, I think the answer is you can't have too many extensions. It'll be fun though finding out why chrome works this way.

Luke Johnston

How about an option in chrome://extensions/ that could be set to disallow a particular extension from running in the background.

Jorge A. Gonzalez

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.