Skip to content

Improve Tracing load times#656

Merged
KirillOsenkov merged 4 commits intoKirillOsenkov:mainfrom
yuehuang010:main
Feb 24, 2023
Merged

Improve Tracing load times#656
KirillOsenkov merged 4 commits intoKirillOsenkov:mainfrom
yuehuang010:main

Conversation

@yuehuang010
Copy link
Copy Markdown
Contributor

Switch to OnRender(DrawContext) for Canvas

  • Speed up rendering up to 10x faster.
  • Simplify TextBlock to reduce creating UI elements.
  • Have to redo on_clicks math since TextBlock aren't part of the Canvas Hierarchy.
  • Lost mouse over Tooltips ( 😞 ). Workaround is to double click.
  • Load full graph instead of culled subset. The load times are now fast enough!

Parallelize Timeline Population (up to 2-3x faster)

  • VisitAllChildren itself takes a long time. There are just a lot of items to go though.
  • Move CppAnalysis into one VisitAllChildren, one less loop.

Misc

  • Use case insensitive when parsing $time, $starttime, $endtime
  • Search results would show adornment instead of only Framework.
  • Fix an issue when mouse zoom would over zoom.

var nodeId = timedNode.NodeId;
if (!Lanes.TryGetValue(nodeId, out var lane))
{
lane = new Lane();
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a race condition here where two threads can both create a lane for the same node id

{
if (this.tracing.Timeline == null)
{
var start = DateTime.Now;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do UtcNow maybe

@KirillOsenkov KirillOsenkov merged commit d510c47 into KirillOsenkov:main Feb 24, 2023
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

Successfully merging this pull request may close these issues.

2 participants