Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSv. Lockal <lockalsash@gmail.com>2013-12-15 18:06:04 +0400
committerSv. Lockal <lockalsash@gmail.com>2013-12-15 18:06:04 +0400
commit2b0ba65c513b362617556551028360184f58ecc1 (patch)
treef24db0f5ab6b3b5a541cf6fab34d75363cae886f /source/blender/makesdna/DNA_genfile.h
parent4a141022c39cefd422e66772714f54ccb3ec7733 (diff)
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: http://developer.blender.org/D105
Diffstat (limited to 'source/blender/makesdna/DNA_genfile.h')
-rw-r--r--source/blender/makesdna/DNA_genfile.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_genfile.h b/source/blender/makesdna/DNA_genfile.h
index 96d71288c62..9a6c7144692 100644
--- a/source/blender/makesdna/DNA_genfile.h
+++ b/source/blender/makesdna/DNA_genfile.h
@@ -68,7 +68,7 @@ void DNA_struct_switch_endian(struct SDNA *oldsdna, int oldSDNAnr, char *data);
char *DNA_struct_get_compareflags(struct SDNA *sdna, struct SDNA *newsdna);
void *DNA_struct_reconstruct(struct SDNA *newsdna, struct SDNA *oldsdna, char *compflags, int oldSDNAnr, int blocks, void *data);
-int DNA_elem_array_size(const char *astr, int len);
+int DNA_elem_array_size(const char *str);
int DNA_elem_offset(struct SDNA *sdna, const char *stype, const char *vartype, const char *name);
bool DNA_struct_elem_find(struct SDNA *sdna, const char *stype, const char *vartype, const char *name);