Blender Git Loki

Git Commits -> Revision 2b0ba65

Revision 2b0ba65 by Sv. Lockal (master)
December 15, 2013, 14:06 (GMT)
Minor optimization for strlen and memcpy calls for reading blend files

Summary:
This commit removes ~10000 strlen calls and ~100000 memcpy calls in blender (profiled with blender --background), ~10000 memcpy calls in makesdna.

There is no need to create null-terminated strings for atoi, because it converts only the initial portion of the string anyway.
Also it was noticed that DNA_elem_array_size and arraysize functions work only with full strings, so there is no point to calculate strlen.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D105

Commit Details:

Full Hash: 2b0ba65c513b362617556551028360184f58ecc1
Parent Commit: 4a14102
Lines Changed: +25, -31

4 Modified Paths:

/source/blender/makesdna/DNA_genfile.h (+1, -1) (Diff)
/source/blender/makesdna/intern/dna_genfile.c (+16, -19) (Diff)
/source/blender/makesdna/intern/makesdna.c (+7, -10) (Diff)
/source/blender/makesrna/intern/rna_define.c (+1, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021