[tarantool-patches] Re: [PATCH v1 1/1] box: disable sparse optimization in box.tuple.new()

Kirill Yukhin kyukhin at tarantool.org
Mon Feb 18 11:45:16 MSK 2019


Hello,

On 11 Feb 13:43, Kirill Shcherbatov wrote:
> The box.tuple.new() used to call luamp_encode_tuple with
> default LUA serializer config 'luaL_msgpack_default'. This
> routine may consider an array to be excessively sparse when
>   + encode_sparse_ratio > 0
>   + max(table) > encode_sparse_safe
>   + max(table) > count(table) * encode_sparse_ratio.
> Sparse optimization save memory via representing excessively
> sparse tuple as MP_MAP. But Tarantool tuple always must be
> MP_ARRAY so it is not relevant for box.tuple.new semantics.
> So it is disabled with encode_sparse_ratio = 0 in a new local
> serializer config.
> 
> Closes #3882

I've checked your patch into 1.10 and 2.1 branches.

--
Regards, Kirill Yukhin




More information about the Tarantool-patches mailing list