Tips for optimizing Chrome Extensions

1,125 views
Skip to first unread message

Vinit kumar

unread,
Dec 8, 2012, 1:17:12 PM12/8/12
to chromium-...@chromium.org
Please suggest some good tips to optimize a chrome Extension for good performance. Specially when you need to do some resource consuming work. 
Thanks!

PhistucK

unread,
Dec 9, 2012, 5:51:16 AM12/9/12
to Vinit kumar, chromium-...@chromium.org
Be more specific. What are you doing? show some code, tell us what you are trying to do, what you are trying to actually optimize, what is slow.

PhistucK



On Sat, Dec 8, 2012 at 8:17 PM, Vinit kumar <vinit...@gmail.com> wrote:
Please suggest some good tips to optimize a chrome Extension for good performance. Specially when you need to do some resource consuming work. 
Thanks!

--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msg/chromium-extensions/-/GyjDWPP3nIsJ.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.

Vinit kumar

unread,
Dec 9, 2012, 6:12:16 AM12/9/12
to chromium-...@chromium.org


On Saturday, December 8, 2012 11:47:12 PM UTC+5:30, Vinit kumar wrote:
Please suggest some good tips to optimize a chrome Extension for good performance. Specially when you need to do some resource consuming work. 
Thanks!

I recently made a chrome extension that does multiple ajax request to Facebook Graph API and Google URL Shortener (can't disclose more of it at this stage since product is to be live in some days). Moving on, i was expecting some general suggestions say minifying js and css etc, that Extension developers generally employ to optimise their extension. An elaborate TODO or TO-CHECK list or do's and don'ts would satisfy my appetite on this topic.

Thanks

Vladyslav Volovyk

unread,
Dec 9, 2012, 10:52:44 AM12/9/12
to chromium-...@chromium.org
TO-CHECK:
Open the Chrome task manager and check CPU & RAM usage for you extension. 
Also check how this values changes for you extension after full day of Chrome run for example.

RAM - if more than 15Mb it is a serious reason to not release this without further optimizations.
CPU - any value above Zero on a persistence basis is a very bad sign.

Abraham Williams

unread,
Dec 9, 2012, 11:46:02 AM12/9/12
to Vinit kumar, Chromium-extensions
Minification is mostly used to reduce over the wire size and increase loading speed. Since extensions are located on disk that really isn't much of a concern.

You should read about standard web development performance enhancements as extensions are just HTML/JavaScript. Memory holes are especially important in background scripts since they tend to be much longer lived than standard webpages.

You should spend a lot of time using the Chrome Dev Tools to see where you can optimize your code. The Timeline, Profiles, and Audits features will all help you find various types of performance issues.



Abraham
--
This email is: [ ] shareable [x] ask first [ ] private



--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
Message has been deleted

tagalong.io

unread,
Dec 9, 2012, 1:14:10 PM12/9/12
to chromium-...@chromium.org
Hi Vinit,

I have not yet tried but it seems that closure compiler can help your code execute faster. If you have identified that the execution of your code is more of an issue than the potential for maximizing the speed of your end points, I would try that. But, in my experience with the facebook apis, I have found that working through bulk calls to FB and caching locally can significantly improve speed over the optimization of code execution. That will depend on how good your execution design is. One other thing to note is that if you are concerned with the speed or delay your user experiences, then UI design is a great place to start. The perceived speed of an application can be significantly altered just by setting expectations appropriately, with regard to the speed with which a particular process will execute. So, tell the user it will be 10 seconds when it will take 8. Show them frequent, even if just guestimated, updates about the processing state. Like, "your request is 25% complete." I hope that helps and if not, I still had a good time writing it. :)
Reply all
Reply to author
Forward
0 new messages