servo/components/layout
Nicholas Nethercote ece2711185 Add memory reporting infrastructure and use it to measure the display list.
This changeset implements the beginnings of fine-grained measurement of
Servo's data structures.

- It adds a new `SizeOf` trait, which is used to measure the memory used
  by heap data structures, and implements it for some std types: Box,
  String, Option, Arc, Vec, and DList.

- It adds a new `MemoryReporter` trait which is used to report memory
  measurements from other threads to the memory profiler. Reporters are
  registered and unregistered with the memory profiler, and the memory
  profiler makes measurement requests of reporters when necessary.

- It plumbs a MemoryProfilerChan through to the layout task so it can
  register a memory reporter.

- It implements the `SizeOf` trait for `DisplayList` and associated
  types, and adds a memory reporter that uses it.

The display list hits 14.77 MiB when viewing
tests/html/perf-rainbow.html, and 2.51 MiB when viewing the Guardians of
the Galaxy Wikipedia page from servo-static-suite. Example output:

  0.29: display-list::http://www.reddit.com/
  0.00: display-list::http://static.adzerk.net/reddit/ads.html?sr=-reddit.com,loggedout&bust2#http://www.reddit.com
  0.00: display-list::http://www.reddit.com/static/createadframe.html

There are a number of FIXME comments indicating sub-optimal things. This
is a big enough change for now that doing them as follow-ups seems best.
2015-03-16 18:12:26 -07:00
..
css Fix broken viewport percentage length units after a viewport resize. 2015-03-08 13:06:27 -06:00
block.rs Fixes the problem with canvas not being rendered when displayed as block level elements 2015-03-15 22:10:06 -07:00
Cargo.toml Move selector matching to an external library, for use outside Servo. 2015-02-23 16:29:34 +01:00
construct.rs Restore part of PR #5125 that was accidentally removed in PR #5160. 2015-03-16 15:02:26 +10:00
context.rs Fix broken viewport percentage length units after a viewport resize. 2015-03-08 13:06:27 -06:00
data.rs Merge in servo/master 2015-03-05 17:34:18 +00:00
display_list_builder.rs layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1 2015-03-09 17:13:45 -07:00
floats.rs Get rid of servo_util 2015-03-05 17:42:05 +00:00
flow.rs Fix memory leak in flow tree by adding weak refs. 2015-03-16 12:53:16 -06:00
flow_list.rs Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10:00
flow_ref.rs Fix memory leak in flow tree by adding weak refs. 2015-03-16 12:53:16 -06:00
fragment.rs layout: Implement border-spacing per CSS 2.1 § 17.6.1 and the legacy 2015-03-12 12:00:40 -07:00
generated_content.rs layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1 2015-03-09 17:13:45 -07:00
incremental.rs layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1 2015-03-09 17:13:45 -07:00
inline.rs layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1 2015-03-09 17:13:45 -07:00
layout_debug.rs Use rustc-serialize rather than the built-in deprecated serialize. 2015-02-17 13:24:15 +01:00
layout_task.rs Add memory reporting infrastructure and use it to measure the display list. 2015-03-16 18:12:26 -07:00
lib.rs Fix memory leak in flow tree by adding weak refs. 2015-03-16 12:53:16 -06:00
list_item.rs layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1 2015-03-09 17:13:45 -07:00
model.rs Get rid of servo_util 2015-03-05 17:42:05 +00:00
opaque_node.rs Extract OpaqueNodeMethods to own file 2015-03-03 17:49:10 +00:00
parallel.rs Get rid of servo_util 2015-03-05 17:42:05 +00:00
sequential.rs layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1 2015-03-09 17:13:45 -07:00
table.rs layout: Implement border-spacing per CSS 2.1 § 17.6.1 and the legacy 2015-03-12 12:00:40 -07:00
table_caption.rs layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1 2015-03-09 17:13:45 -07:00
table_cell.rs layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1 2015-03-09 17:13:45 -07:00
table_colgroup.rs layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1 2015-03-09 17:13:45 -07:00
table_row.rs layout: Implement border-spacing per CSS 2.1 § 17.6.1 and the legacy 2015-03-12 12:00:40 -07:00
table_rowgroup.rs layout: Implement border-spacing per CSS 2.1 § 17.6.1 and the legacy 2015-03-12 12:00:40 -07:00
table_wrapper.rs layout: Implement border-spacing per CSS 2.1 § 17.6.1 and the legacy 2015-03-12 12:00:40 -07:00
text.rs Get rid of servo_util 2015-03-05 17:42:05 +00:00
traversal.rs layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1 2015-03-09 17:13:45 -07:00
wrapper.rs layout: Implement border-spacing per CSS 2.1 § 17.6.1 and the legacy 2015-03-12 12:00:40 -07:00