You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Report memory usage of Stylist in LayoutTaskData #7038
E-more-complexVariable effort required; may require a mentor. Recommended solution is clearly described in the issI-perf-bloatUnnecessary memory usage.
As part of collect_reports in layout_task.rs, we should measure the heap usage of the stylist member of LayoutTaskData. This involves adding #[derive(HeapSizeOf)] to Stylist in components/style/selector_matching.rs, calling heap_size_of on the member in collect_reports, and fixing any compile errors that result.
Is this how I'm supposed to be measuring the stuff in rust-selectors (the code in components/util/mem.rs)? SelectorMap is a real problem, since it's members are private I can't measure them.
If necessary we can always make private fields public, but maybe HeapSizeOf and its derive plugin should move to external crates? What do you think @jdm?
Note that so far we’ve moved things to separate source repositories when publishing then to crates.io, but we don’t need to.
(Though I think servo users should still get the crate form crates.io rather than through a path dependency, to force us to keep the crates.io version up to date.)
Yes, I think at this point it makes sense to move the definition of HeapSizeOf, heap_size_of, the plugin, and implementations for the various types from std into an external crate.
If it's to be built as part of Servo, wouldn't that result in two copies of the same crate? One pulled in by rust-selectors from crates.io, and the other from the checked-out repository?
There are still a couple instances of #[ignore_heap_size_of = "#7038"] in components/style/properties/properties.mako.rs. @jdm, can these be fixed now?
E-more-complexVariable effort required; may require a mentor. Recommended solution is clearly described in the issI-perf-bloatUnnecessary memory usage.
Activity
notriddle commentedon Aug 6, 2015
✋ Can I take this one?
jdm commentedon Aug 6, 2015
You bet!
notriddle commentedon Aug 7, 2015
Is this how I'm supposed to be measuring the stuff in rust-selectors (the code in
components/util/mem.rs)? SelectorMap is a real problem, since it's members are private I can't measure them.SimonSapin commentedon Aug 7, 2015
If necessary we can always make private fields public, but maybe
HeapSizeOfand its derive plugin should move to external crates? What do you think @jdm?SimonSapin commentedon Aug 7, 2015
Note that so far we’ve moved things to separate source repositories when publishing then to crates.io, but we don’t need to.
(Though I think servo users should still get the crate form crates.io rather than through a
pathdependency, to force us to keep the crates.io version up to date.)jdm commentedon Aug 7, 2015
Yes, I think at this point it makes sense to move the definition of HeapSizeOf, heap_size_of, the plugin, and implementations for the various types from std into an external crate.
notriddle commentedon Aug 7, 2015
So, should I do that? The repo really belongs in the Servo organization.
jdm commentedon Aug 7, 2015
Like @SimonSapin said, it doesn't need to be in a separate repository.
jdm commentedon Aug 7, 2015
I propose a new
components/heapsize.notriddle commentedon Aug 7, 2015
So you're suggesting that
components/heapsizebe in the Servo repo, but be published to crates.io?jdm commentedon Aug 7, 2015
Yep.
notriddle commentedon Aug 7, 2015
If it's to be built as part of Servo, wouldn't that result in two copies of the same crate? One pulled in by rust-selectors from crates.io, and the other from the checked-out repository?
5 remaining items
notriddle commentedon Mar 3, 2016
I'm not working on it right now.
On Thu, Mar 3, 2016, 09:56 Keith Yeung [email protected] wrote:
Report memory usage from LayoutThreadData Stylist [servo#7038]
Auto merge of #10088 - pkondzior:7038-report-memory-usage-in-layout-t…
Auto merge of #10088 - pkondzior:7038-report-memory-usage-in-layout-t…
jdm commentedon Apr 5, 2016
Fixed by #10088.
SimonSapin commentedon Jun 21, 2016
There are still a couple instances of
#[ignore_heap_size_of = "#7038"]incomponents/style/properties/properties.mako.rs. @jdm, can these be fixed now?jdm commentedon Jun 21, 2016
I would expect so.
jdm commentedon Jun 21, 2016
It would be worth filing issues for any in particular that cannot be removed.
jdm commentedon Jul 13, 2016
Unfortunately those cannot be removed because we don't know how to measure Arc values effectively.