Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upStart reporting memory usage for Window and all nodes in all DOM tree… #6874
Conversation
|
|
|
Cool beans, dude. I have a bunch of suggestions but they're all minor. I shudder to think how much larger an equivalent patch for Firefox would be. This You've used Review status: 0 of 33 files reviewed at latest revision, 15 unresolved discussions, some commit checks failed. components/script/dom/bindings/cell.rs, line 20 [r1] (raw file): components/script/dom/bindings/js.rs, line 48 [r1] (raw file): components/script/dom/bindings/js.rs, line 245 [r1] (raw file): components/script/dom/bindings/utils.rs, line 431 [r1] (raw file): components/script/dom/browsercontext.rs, line 37 [r1] (raw file): components/script/dom/browsercontext.rs, line 94 [r1] (raw file): components/script/dom/window.rs, line 171 [r1] (raw file): components/script/memory.rs, line 5 [r1] (raw file): components/script/memory.rs, line 15 [r1] (raw file): How about A comment about the purpose of this trait would also be useful. AFAICT it's for measuring heap-allocated things that aren't components/script/memory.rs, line 23 [r1] (raw file): components/script/script_task.rs, line 1118 [r1] (raw file): components/script/timers.rs, line 117 [r1] (raw file): components/style/values.rs, line 109 [r1] (raw file): components/util/mem.rs, line 144 [r1] (raw file): components/util/mem.rs, line 145 [r1] (raw file): Comments from the review on Reviewable.io |
|
Thanks for the review! Review status: 0 of 33 files reviewed at latest revision, 15 unresolved discussions, some commit checks failed. components/script/dom/browsercontext.rs, line 94 [r1] (raw file): components/script/memory.rs, line 15 [r1] (raw file): components/script/memory.rs, line 23 [r1] (raw file): components/util/mem.rs, line 144 [r1] (raw file): Comments from the review on Reviewable.io |
Ok, that's probably a pretty good estimate, then. |
|
I keep going back and forth on this |
|
I suggest sticking with 0 for |
|
Updated! All comments should have been addressed; I care less about associating a name with TODO/FIXME than I do filing issues and attaching those instead. |
|
Sample output for google.com:
|
|
Sample output for the html5 spec index page:
|
|
Reviewed 33 of 33 files at r1, 24 of 24 files at r2. components/util/mem.rs, line 144 [r1] (raw file): Comments from the review on Reviewable.io |
|
Looks great! r=me, or r+, or whatever I'm supposed to type, not that I have the appropriate privileges to talk to Bors, or Homu, or whatever it's called. Whatever! |
|
@bors-servo: r=njn |
|
|
|
@bors-servo: r- |
|
|
…s for frame treese in script tasks.
|
@bors-servo: r=njn |
|
|
Start reporting memory usage for Window and all nodes in all DOM tree… …s for frame treese in script tasks. This underreports by a significant amount, since only Document, Window and CharacterData (ie. text) nodes are fully represented. That being said, every HTML element in the tree is measured, but only counted as a Node. It's easy to improve this, it just requires adding the appropriate HeapSizeOf derives and increasing the granularity of `measure_memory_for_eventtarget`. google.com shows a dom-tree value of 0.24 MB for me at the moment. r? @nnethercote <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6874) <!-- Reviewable:end -->
Fix panics in the script_task memory reporter. These are caused by page_root being empty. @jdm, I think it was #6874 that introduced these. I'm seeing them all the time when starting Servo on Reddit with memory profiling enabled. With this patch applied they go away. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7252) <!-- Reviewable:end -->
jdm commentedJul 31, 2015
…s for frame treese in script tasks.
This underreports by a significant amount, since only Document, Window and CharacterData (ie. text) nodes are fully represented. That being said, every HTML element in the tree is measured, but only counted as a Node. It's easy to improve this, it just requires adding the appropriate HeapSizeOf derives and increasing the granularity of
measure_memory_for_eventtarget. google.com shows a dom-tree value of 0.24 MB for me at the moment.r? @nnethercote