Go to file
Christoph Lendenfeld 0d7b0045c6 Animation: Graph Editor curve drawing performance improvement
In current blender, when drawing curves in the Graph Editor,
it always iterates over the whole curve.
From first to last vertex no matter what is shown on screen.
Instead of that, find the bounding keyframes and iterate within them.

Additionally to that, break apart the logic into two sections
* first iterate over keyframes and add `float2` into a `Vector`
* then iterate over all those points and draw them

The second optimization is to make the Bezier resolution
dependent on the keyframe distance in screenspace.
Previously it just went off the distance between keys in frames,
but that doesn't make sense if you are zoomed out.

## Performance Numbers
The following performance numbers are the
average time **per curve** on a mocap file of 6000f (each frame has a key).
The numbers were generated **without** showing keyframes to only focus
on the performance of this patch.
Also they are from a debug build, so they just make sense relative to each other

| - | before | after |
| - | - | - |
| zoomed in | ~1000μs | ~77μs |
| zoomed out | ~1000μs | ~430μs |

This only affects the actual curves.
Keyframe and handle drawing can likely still be improved

Pull Request: https://projects.blender.org/blender/blender/pulls/110301
2023-08-03 14:43:21 +02:00
.gitea Gitea: update bug report template for security policy 2023-04-11 12:14:01 +02:00
.github Docs: change Git URLs to point projects.blender.org instead of git.blender.org 2023-02-07 14:23:05 +01:00
build_files Cleanup: use C++ includes, various non-functional changes for C++ 2023-08-02 20:30:02 +10:00
doc Fix: API doc generation for bmesh opdefines 2023-07-27 15:58:29 +02:00
extern Fix #110336 Regression: Speaker ignoring of the starting position in NLA track 2023-07-24 16:44:05 +02:00
intern Cleanup: use nullptr instead of zero 2023-08-03 19:17:43 +10:00
locale I18N: updated UI translations from svn trunk (r6647). 2023-07-24 18:03:00 +02:00
release Color Management: Clean up no longer used colorspaces, display device, and LUTs 2023-08-01 14:57:45 +02:00
scripts Cleanup: Move mesh related blenkernel headers to C++ 2023-08-02 22:14:18 +02:00
source Animation: Graph Editor curve drawing performance improvement 2023-08-03 14:43:21 +02:00
tests Cleanup: unused-imports in tests/ 2023-07-25 21:43:53 +10:00
tools Tools: update 'check_cmake' check to skip PUBLIC/PRIVATE prefixes 2023-08-01 14:24:46 +10:00
.clang-format clang-format: set BraceWrapping::AfterControlStatement to "MultiLine" 2023-05-02 09:37:08 +10:00
.clang-tidy Clang-tidy: Ignore variable name length and .c/.cc include warnings 2022-05-06 15:26:54 +02:00
.editorconfig pyproject: add configuration for autopep8 2022-04-22 10:13:39 +10:00
.git-blame-ignore-revs Cleanup: add commit to .git-blame-ignore-revs 2023-05-03 20:31:11 +10:00
.gitignore Ignore build files for VS and VS Code 2023-03-07 17:38:34 +01:00
CMakeLists.txt macOS: remove note about sold linker, mold 2.0 is now free on macOS 2023-08-01 15:43:11 +02:00
COPYING == docs == 2010-10-13 14:44:22 +00:00
GNUmakefile Tools: add --jobs arguments to clang checker and code-clean tool 2023-07-21 00:13:13 +10:00
make.bat make.bat: adjust for recent submodule changes 2023-03-16 17:51:12 -06:00
pyproject.toml pyproject: remove tools/pyproject.toml 2023-03-01 22:18:28 +11:00
README.md Update references to the new projects platform and main branch 2023-02-07 14:18:19 +01:00

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.

See blender.org/about/license for details.