Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display template instantiation origin #93

Open
vittorioromeo opened this issue May 4, 2024 · 0 comments
Open

Display template instantiation origin #93

vittorioromeo opened this issue May 4, 2024 · 0 comments

Comments

@vittorioromeo
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant