manim icon indicating copy to clipboard operation
manim copied to clipboard

Optimize `VMobject.pointwise_become_partial()`

Open chopan050 opened this issue 1 year ago • 0 comments

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 avatar May 14 '24 16:05 chopan050