manim
manim copied to clipboard
Optimize `VMobject.pointwise_become_partial()`
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