Skip to content

Report memory usage of Stylist in LayoutTaskData #7038

Closed

Description

@jdm

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.

Activity

  1. added
    I-perf-bloat
    E-more-complex
    on Aug 6, 2015
  2. notriddle commented on Aug 6, 2015

    @notriddle
    Contributor

    ✋ Can I take this one?

  3. added
    C-assigned
    on Aug 6, 2015
  4. jdm commented on Aug 6, 2015

    @jdm
    MemberAuthor

    You bet!

  5. notriddle commented on Aug 7, 2015

    @notriddle
    Contributor

    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.

  6. SimonSapin commented on Aug 7, 2015

    @SimonSapin
    Member

    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?

  7. SimonSapin commented on Aug 7, 2015

    @SimonSapin
    Member

    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.)

  8. jdm commented on Aug 7, 2015

    @jdm
    MemberAuthor

    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.

  9. notriddle commented on Aug 7, 2015

    @notriddle
    Contributor

    So, should I do that? The repo really belongs in the Servo organization.

  10. jdm commented on Aug 7, 2015

    @jdm
    MemberAuthor

    Like @SimonSapin said, it doesn't need to be in a separate repository.

  11. jdm commented on Aug 7, 2015

    @jdm
    MemberAuthor

    I propose a new components/heapsize.

  12. notriddle commented on Aug 7, 2015

    @notriddle
    Contributor

    So you're suggesting that components/heapsize be in the Servo repo, but be published to crates.io?

  13. jdm commented on Aug 7, 2015

    @jdm
    MemberAuthor

    Yep.

  14. notriddle commented on Aug 7, 2015

    @notriddle
    Contributor

    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?

  15. 5 remaining items

  16. notriddle commented on Mar 3, 2016

    @notriddle
    Contributor

    I'm not working on it right now.

    On Thu, Mar 3, 2016, 09:56 Keith Yeung [email protected] wrote:

    Is this being worked on by @notriddle https://github.com/notriddle or
    is it actually open to other contributors?

    —
    Reply to this email directly or view it on GitHub
    #7038 (comment).

  17. removed
    C-assigned
    on Mar 3, 2016
  18. added
    C-assigned
    on Mar 21, 2016
  19. added 2 commits that reference this issue on Mar 21, 2016
  20. jdm commented on Apr 5, 2016

    @jdm
    MemberAuthor

    Fixed by #10088.

  21. SimonSapin commented on Jun 21, 2016

    @SimonSapin
    Member

    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?

  22. jdm commented on Jun 21, 2016

    @jdm
    MemberAuthor

    I would expect so.

  23. jdm commented on Jun 21, 2016

    @jdm
    MemberAuthor

    It would be worth filing issues for any in particular that cannot be removed.

  24. removed
    C-assigned
    on Jul 8, 2016
  25. jdm commented on Jul 13, 2016

    @jdm
    MemberAuthor

    Unfortunately those cannot be removed because we don't know how to measure Arc values effectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-more-complexI-perf-bloat

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions