Sigurdur Asgeirsson | 51d9d24 | 2019-10-07 20:38:34 | [diff] [blame] | 1 | # Performance Manager Overview |
| 2 | |
| 3 | The Performance Manager centralizes policy for data-driven resource management |
| 4 | and planning. Central to this is the [graph](graph/graph_impl.h) which is |
Olivier Li | 837f3783 | 2019-11-04 16:09:45 | [diff] [blame] | 5 | comprised of nodes that reflect the coarse structure of a browser at the |
Sigurdur Asgeirsson | 51d9d24 | 2019-10-07 20:38:34 | [diff] [blame] | 6 | level of [pages](graph/page_node_impl.h), [frames](graph/frame_node_impl.h) |
Olivier Li | 0e6cff5 | 2020-02-04 17:51:21 | [diff] [blame^] | 7 | [processes](graph/process_node_impl.h), [workers](graph/worker_node_impl.h) and so forth. |
| 8 | |
| 9 | Each node is adorned with relationships and properties sufficient to allow performance management policy |
| 10 | to reason about such things as resource usage and prioritization. Usually properties are added directly |
| 11 | to nodes if they would be used by multiple clients. Otherwise, it's preferred to |
| 12 | add them as private impl details via [NodeAttachedData](graph/node_attached_data_impl.h). See |
| 13 | [ProcessPriorityAggregator](/chrome/browser/performance_manager/decorators/process_priority_aggregator.cc) as an example of |
| 14 | such a use-case. It requires some per-process-node intermediate data which is stored as NodeAttachedData. |
| 15 | |
| 16 | Nodes are nothing but data storage and contain no logic. Properties that need |
| 17 | computation to be maintained are maintained via [decorators](decorators/) or "aggregators" |
| 18 | which are both observers and mutators of the graph. |