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

Optimize VMobject.pointwise_become_partial() #3760

Merged

Conversation

chopan050
Copy link
Contributor

@chopan050 chopan050 commented May 14, 2024

Overview: What does this pull request change?

Related PR: #3292

Optimized VMobject.pointwise_become_partial() so that, instead of building the points array by repeatedly appending points to a NumPy array (which is inefficient), it now creates a single empty array from the beginning to allocate all the points.

Motivation and Explanation: Why and how do your changes improve the library?

Animations like Create, DrawBorderThenFill and Write are based on incrementally showing parts of VMobjects, so these would be benefited by this change.

Links to added or changed documentation pages

Reviewer Checklist

  • The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
  • If applicable: newly added functions and classes are tested

@chopan050 chopan050 added the pr:easy review There is nothing particular (i.e, it's about a general/small thing) to know for review! label Jun 21, 2024
Copy link
Member

@behackl behackl left a comment

Choose a reason for hiding this comment

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

LGTM! I very much like the improved documentation as well!

@behackl behackl merged commit 374eeeb into ManimCommunity:main Jul 13, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance pr:easy review There is nothing particular (i.e, it's about a general/small thing) to know for review!
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants