blob: 45ec683b3f323963ffbd9e629b5049f4230c7fd3 [file] [log] [blame] [view]
Sigurdur Asgeirsson51d9d242019-10-07 20:38:341# Performance Manager Overview
2
3The Performance Manager centralizes policy for data-driven resource management
4and planning. Central to this is the [graph](graph/graph_impl.h) which is
Olivier Li837f37832019-11-04 16:09:455comprised of nodes that reflect the coarse structure of a browser at the
Sigurdur Asgeirsson51d9d242019-10-07 20:38:346level of [pages](graph/page_node_impl.h), [frames](graph/frame_node_impl.h)
Olivier Li0e6cff52020-02-04 17:51:217[processes](graph/process_node_impl.h), [workers](graph/worker_node_impl.h) and so forth.
8
9Each node is adorned with relationships and properties sufficient to allow performance management policy
10to reason about such things as resource usage and prioritization. Usually properties are added directly
11to nodes if they would be used by multiple clients. Otherwise, it's preferred to
12add 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
14such a use-case. It requires some per-process-node intermediate data which is stored as NodeAttachedData.
15
16Nodes are nothing but data storage and contain no logic. Properties that need
17computation to be maintained are maintained via [decorators](decorators/) or "aggregators"
18which are both observers and mutators of the graph.