If you need more elevated privileges than a standard worker allows, consider using a ChromeWorker, which is a Firefox-only API which lets you create workers with more elevated privileges. You might want to consider using a Worker if you need to do some computation that can be done off of the main thread. That means that the more code we can get off of the main thread, the more that thread can respond to user events, paint, and generally be responsive to the user. It's also important to note that most of our JavaScript runs on the main thread, so it's easy for script to cause delays in event processing or painting. # Avoid the main thread where possible The main thread is where we process user events and do painting. Always keep in mind the side effects your changes may have, from blocking other tasks, to interfering with other user interface elements. # Performance best practices for Firefox front-end engineers This guide will help Firefox developers working on front-end code produce code which is as performant as possible-not just on its own, but in terms of its impact on other parts of Firefox.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |