Chromium Code Reviews| Index: chrome/common/extensions/docs/templates/intros/events.html |
| diff --git a/chrome/common/extensions/docs/templates/intros/events.html b/chrome/common/extensions/docs/templates/intros/events.html |
| index 8c4156ce19f288c5b8c16d52904c310ec1a57496..19fbabf9be4b12188b8070acfbed9ca86954d4fc 100644 |
| --- a/chrome/common/extensions/docs/templates/intros/events.html |
| +++ b/chrome/common/extensions/docs/templates/intros/events.html |
| @@ -164,6 +164,24 @@ function getRules(rule_ids, function callback(details) {...}); |
| The <code>details</code> parameter passed to the <code>callback()</code> function |
| refers to an array of rules including filled optional parameters. |
| </p> |
| + |
| +<h3 id="performance">Performance</h3> |
| + |
| +<p> |
| +To achieve maximum performance, you should keep the following guidelines in |
| +mind: |
|
Mike West
2013/04/08 13:52:53
These are excellent tips: I think they'd be even m
battre
2013/04/08 14:42:55
Done.
|
| +<ul> |
| + <li>Register and unregister rules in bulk. After each |
| + registration or unregistration, Chrome needs to update internal data |
| + structures. This update is an expensive operation. |
| + <li>Prefer substring matching over matching using regular expressions in a |
| + $ref:events.UrlFilter. Substring based matching is extremely fast. |
| + <li>If you have many rules that all share the same actions, you may merge |
| + the rules into one because rules trigger their actions as soon as a single |
| + condition is fulfilled. This speeds up the matching and reduces memory |
| + consumption for duplicate action sets. |
| +</ul> |
| +</p> |
| </div> |
| {{/is_apps}} |