diff --git a/pygridgain/datatypes/primitive_arrays.py b/pygridgain/datatypes/primitive_arrays.py index e498336..7887c99 100644 --- a/pygridgain/datatypes/primitive_arrays.py +++ b/pygridgain/datatypes/primitive_arrays.py @@ -185,7 +185,12 @@ def parse_not_null(cls, stream): @classmethod def to_python_not_null(cls, ctypes_object, **kwargs): - return [ctypes_object.data[i] for i in range(ctypes_object.length)] + # Bulk buffer decode instead of an element-wise Python list comprehension over the + # ctypes array (~the dominant client cost for large float vectors). Cast through bytes + # to the native element format (ctypes LittleEndianStructure reports e.g. '=!@')).tolist() @classmethod def from_python_not_null(cls, stream, value, **kwargs):