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

Improve performance when changing shown patch on the report tab #3660

Closed
hhyyrylainen opened this issue Aug 4, 2022 · 8 comments · Fixed by #3673
Closed

Improve performance when changing shown patch on the report tab #3660

hhyyrylainen opened this issue Aug 4, 2022 · 8 comments · Fixed by #3673

Comments

@hhyyrylainen
Copy link
Member

With a bunch of data that causes quite big lag spikes. In our code the biggest things seem to be #3659 as well as:
Kuvakaappaus - 2022-08-04 14-48-30

and:
Kuvakaappaus - 2022-08-04 14-48-54

I think ultimately the biggest performance thing is how many Godot objects get destroyed and recreated each time. I think instead we'll need to either cache the timeline display objects and update them or make bigger rich text blocks to have fewer overall objects.

@hhyyrylainen
Copy link
Member Author

I set this as high priority as the lag is experienced much more often with: #3658

@84634E1A607A
Copy link
Contributor

we'll need to either cache the timeline display object

eventsContainer.FreeChildren();

We can split eventsContainer into globalEventsContainer and localEventsContainer so that only local events will be updated; and custom rich text label count can be reduced.

@hhyyrylainen
Copy link
Member Author

We can split eventsContainer into globalEventsContainer and localEventsContainer

That sounds like a pretty simple change with the potential to improve performance a lot.

@84634E1A607A
Copy link
Contributor

84634E1A607A commented Aug 4, 2022

private Control? GetGroup(string name, bool verbose = true)

This uses plain search. Dictionary / Binary search will improve performance a lot. (First Pic, 0.42%)

Plus, a great fraction of time in ClearChart should also be spent here.

@84634E1A607A
Copy link
Contributor

dataLine.InterpolatePointPosition(

Skip animation (or even entire draw) if line is not drawn.

@84634E1A607A
Copy link
Contributor

84634E1A607A commented Aug 6, 2022

image

On master (timeline tab not yet involves) (Sorry that's move to patch)

@hhyyrylainen
Copy link
Member Author

Moving to a patch has always had a lag spike, mostly due to: #1085

@84634E1A607A
Copy link
Contributor

84634E1A607A commented Aug 6, 2022

src/microbe_stage/editor/MicrobeEditorReportComponent.cs UpdatePatchDetails called twice.
image

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

Successfully merging a pull request may close this issue.

2 participants