diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2014-10-21 23:08:02 -0700 |
---|---|---|
committer | Patrick Walton <pcwalton@mimiga.net> | 2014-10-23 09:13:41 -0700 |
commit | de5e2fd5e22ce1e61dce8c7540c87471c810037f (patch) | |
tree | d5e028b67c68b60b0cea369e56b48c2ceaa18475 /components/layout/layout_debug.rs | |
parent | 2df236376a443d8d031ee7a72379f336f2cd8cc4 (diff) | |
download | servo-de5e2fd5e22ce1e61dce8c7540c87471c810037f.tar.gz servo-de5e2fd5e22ce1e61dce8c7540c87471c810037f.zip |
layout: Shrink fragments down from 448 bytes down to 128 bytes.
16% performance improvement in layout (!)
Diffstat (limited to 'components/layout/layout_debug.rs')
-rw-r--r-- | components/layout/layout_debug.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/layout/layout_debug.rs b/components/layout/layout_debug.rs index 21e2e59324c..5f3051a9610 100644 --- a/components/layout/layout_debug.rs +++ b/components/layout/layout_debug.rs @@ -92,8 +92,8 @@ impl Drop for Scope { /// Generate a unique ID. This is used for items such as Fragment /// which are often reallocated but represent essentially the /// same data. -pub fn generate_unique_debug_id() -> uint { - unsafe { DEBUG_ID_COUNTER.fetch_add(1, SeqCst) } +pub fn generate_unique_debug_id() -> u16 { + unsafe { DEBUG_ID_COUNTER.fetch_add(1, SeqCst) as u16 } } /// Begin a layout debug trace. If this has not been called, |