RNA: Speed up raw array access when the property is stored contiguously
Recent and ongoing efforts have changed many properties to be stored contiguously in memory, e.g. mesh attributes. This patch updates rna_raw_access to make use of this and copy the entire contiguous block of memory when the property is stored contiguously. This is faster and scales much better with larger arrays. Pull Request: https://projects.blender.org/blender/blender/pulls/116015
This commit is contained in:
committed by
Brecht Van Lommel
parent
35e8959d77
commit
fdb56c4e8d
@@ -5304,7 +5304,7 @@ static int foreach_parse_args(BPy_PropertyRNA *self,
|
||||
const char **r_attr,
|
||||
PyObject **r_seq,
|
||||
int *r_tot,
|
||||
int *r_size,
|
||||
size_t *r_size,
|
||||
RawPropertyType *r_raw_type,
|
||||
int *r_attr_tot,
|
||||
bool *r_attr_signed)
|
||||
@@ -5466,7 +5466,8 @@ static PyObject *foreach_getset(BPy_PropertyRNA *self, PyObject *args, int set)
|
||||
/* Get/set both take the same args currently. */
|
||||
const char *attr;
|
||||
PyObject *seq;
|
||||
int tot, size, attr_tot;
|
||||
int tot, attr_tot;
|
||||
size_t size;
|
||||
bool attr_signed;
|
||||
RawPropertyType raw_type;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user