Skip to content

Display template instantiation origin #93

@vittorioromeo

Description

@vittorioromeo

In the report, we can see:

**** Templates that took longest to instantiate:
  1079 ms: std::variant<sf::Event::Empty, sf::Event::Closed, sf::Event::Resized... (18 times, avg 59 ms)
   961 ms: std::__detail::__variant::_Variant_base<sf::Event::Empty, sf::Event:... (18 times, avg 53 ms)
   ...

**** Template sets that took longest to instantiate:
  1582 ms: std::vector<$> (740 times, avg 2 ms)
  1273 ms: std::unique_ptr<$> (115 times, avg 11 ms)
  ...

It would be nice if we could somehow figure out where the bulk of these instantiations come from. For example, it would be useful if the report showed something like the following:

  1079 ms: std::variant<sf::Event::Empty, sf::Event::Closed, sf::Event::Resized... (18 times, avg 59 ms)
       - 12 times in Foo.cpp
       - 6 times in Bar.cpp
   ...

**** Template sets that took longest to instantiate:
  1582 ms: std::vector<$> (740 times, avg 2 ms)
      - 420 times in Baz.cpp
      - 320 times in Abc.cpp
  ...

Not sure how feasible/difficult this would be to implement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions