From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 4C331246F4 for ; Tue, 12 Feb 2019 06:33:49 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ehm2E5lCqruJ for ; Tue, 12 Feb 2019 06:33:49 -0500 (EST) Received: from smtp55.i.mail.ru (smtp55.i.mail.ru [217.69.128.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 04DD6267FE for ; Tue, 12 Feb 2019 06:33:48 -0500 (EST) Date: Tue, 12 Feb 2019 14:33:46 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: box: disable sparse optimization in box.tuple.new() Message-ID: <20190212113346.GA20610@chai> References: <38d2414b18464bc28be295281de1779fd7cfb1cc.1549881301.git.kshcherbatov@tarantool.org> <708eb7bb-88a5-7663-3682-bd4d4a61d2c5@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <708eb7bb-88a5-7663-3682-bd4d4a61d2c5@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: Vladislav Shpilevoy * Kirill Shcherbatov [19/02/12 14:23]: > 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. Why not keep a separate config around instead of tweaking the default config each time? -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov