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

Update IsChildOf graph walk in LayersGraph.cs #559

Merged
merged 3 commits into from
May 22, 2024
Merged

Conversation

getrou
Copy link
Contributor

@getrou getrou commented May 15, 2024

It looks like the recursive graph walk in LayersGraph.cs was intended to use the visited set of nodes as part of its traversal. In a quick test, I saw a Lottie json file load time go from 2 minutes down to 15 seconds.

Discovered by running the Visual Studio profiler over the Lottie Viewer

It looks like the recursion here was intended to use the visited set of nodes as part of its traversal. In a quick test, I saw a Lottie json file load time go from 2 minutes down to 15 seconds.
@jeffstall
Copy link

        /// If not null then this node was merged with another node and wee should consider them as one node now.

Fix spelling while we're here.


Refers to: source/LottieData/Optimization/LayersGraph.cs:30 in d0c6ca8. [](commit_id = d0c6ca8, deletion_comment = False)

@jeffstall
Copy link

#if PUBLIC_LottieData

It would be helpful to have some text art to show what this looks like. It's a little trouble to visualize. It's making it difficult to understand if there's better optimizations so that we don't need to call IsChildOf() at all.


Refers to: source/LottieData/Optimization/LayersGraph.cs:15 in d0c6ca8. [](commit_id = d0c6ca8, deletion_comment = False)

jeffstall
jeffstall previously approved these changes May 16, 2024
Copy link

@jeffstall jeffstall left a comment

Choose a reason for hiding this comment

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

:shipit:

…ptimize option set on the LottieVisualSource
Copy link

@jeffstall jeffstall left a comment

Choose a reason for hiding this comment

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

Thanks for the updates!

@getrou getrou merged commit ce37b11 into main May 22, 2024
3 checks passed
@delete-merged-branch delete-merged-branch bot deleted the dev/getrou/perf_fix branch May 22, 2024 23:16
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.

None yet

3 participants