Bug 1420741 - style: Log a bit more information about invalidation collection. r=xidorn, a=gchang
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 29 Nov 2017 14:14:58 -0600
changeset 442696 8340a945b6e35291dcf308bc4488596a58152d31
parent 442695 f402c67ee9b03e2057afee139eea99456749b65e
child 442697 671706994162518e80a4b9f8125ff8e8c1bc3b1f
push id8303
push userryanvm@gmail.com
push dateMon, 04 Dec 2017 15:05:10 +0000
treeherdermozilla-beta@671706994162 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersxidorn, gchang
bugs1420741
milestone58.0
Bug 1420741 - style: Log a bit more information about invalidation collection. r=xidorn, a=gchang Source-Repo: https://github.com/servo/servo Source-Revision: 05b57e67b6f57ac8af8008c63134deeb5b5c1e12
servo/components/style/invalidation/element/collector.rs
servo/components/style/invalidation/element/invalidator.rs
--- a/servo/components/style/invalidation/element/collector.rs
+++ b/servo/components/style/invalidation/element/collector.rs
@@ -159,16 +159,31 @@ where
             let current_id = element.get_id();
 
             if old_id != current_id {
                 id_removed = old_id;
                 id_added = current_id;
             }
         }
 
+        debug!("Collecting changes for: {:?}", element);
+        debug!(" > state: {:?}", state_changes);
+        debug!(
+            " > id changed: {:?} -> +{:?} -{:?}",
+            snapshot.id_changed(),
+            id_added,
+            id_removed
+        );
+        debug!(
+            " > class changed: {:?} -> +{:?} -{:?}",
+            snapshot.class_changed(),
+            classes_added,
+            classes_removed
+        );
+
         let lookup_element =
             if element.implemented_pseudo_element().is_some() {
                 element.pseudo_element_originating_element().unwrap()
             } else {
                 element
             };
 
         let invalidated_self = {
--- a/servo/components/style/invalidation/element/invalidator.rs
+++ b/servo/components/style/invalidation/element/invalidator.rs
@@ -236,19 +236,19 @@ where
         let mut invalidated_self = self.processor.collect_invalidations(
             self.element,
             &mut self_invalidations,
             &mut descendant_invalidations,
             &mut sibling_invalidations,
         );
 
         debug!("Collected invalidations (self: {}): ", invalidated_self);
-        debug!(" > self: {:?}", descendant_invalidations);
-        debug!(" > descendants: {:?}", descendant_invalidations);
-        debug!(" > siblings: {:?}", sibling_invalidations);
+        debug!(" > self: {}, {:?}", self_invalidations.len(), self_invalidations);
+        debug!(" > descendants: {}, {:?}", descendant_invalidations.len(), descendant_invalidations);
+        debug!(" > siblings: {}, {:?}", sibling_invalidations.len(), sibling_invalidations);
 
         let invalidated_self_from_collection = invalidated_self;
 
         invalidated_self |= self.process_descendant_invalidations(
             &self_invalidations,
             &mut descendant_invalidations,
             &mut sibling_invalidations,
         );