servo/components/script
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
..
dom First part of refactoring constellation to support iframe navigation. 2015-03-17 09:35:41 +10:00
parse Upgrade to rustc ba2f13ef0 2015-02-04 2015-02-11 14:48:34 -08:00
build.rs Upgrade to rustc ba2f13ef0 2015-02-04 2015-02-11 14:48:34 -08:00
Cargo.toml Move selector matching to an external library, for use outside Servo. 2015-02-23 16:29:34 +01:00
cors.rs Remove AccessControl header implementations in favor of hyper’s (fixes #5090) 2015-02-27 08:35:02 -08:00
devtools.rs Move everything unrelated to the frame tree out of Page and into Document or Window. Reduce the API surface of Page to a bare minimum to allow for easier future removal. 2015-03-03 16:25:40 -05:00
layout_interface.rs Add memory reporting infrastructure and use it to measure the display list. 2015-03-16 18:12:26 -07:00
lib.rs Move selector matching to an external library, for use outside Servo. 2015-02-23 16:29:34 +01:00
makefile.cargo Cargoify servo 2014-09-08 20:21:42 -06:00
page.rs Remove unused subpage field from page 2015-03-11 14:13:30 +10:00
script_task.rs First part of refactoring constellation to support iframe navigation. 2015-03-17 09:35:41 +10:00
tests.rs Use NonZero to reduce the size of DOM smart pointers (fixes #4502). 2015-01-30 22:18:22 +01:00
textinput.rs Use platform-sized integers for textinput.rs 2015-02-20 16:12:58 -05:00
timers.rs Derive Debug rather than the deprecated Show for TimerControlMsg. 2015-02-24 10:50:21 +01:00