From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 1D10E4696C0 for ; Fri, 13 Dec 2019 16:56:39 +0300 (MSK) Date: Fri, 13 Dec 2019 16:56:38 +0300 From: Nikita Pettik Message-ID: <20191213135638.GA92278@tarantool.org> References: <0a6806665bbc165dffc23967be57135a46bbad62.1574277369.git.korablev@tarantool.org> <20191204115954.GM6592@atlas> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191204115954.GM6592@atlas> Subject: Re: [Tarantool-patches] [PATCH v2 11/16] sql: introduce sql_stmt_sizeof() function List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Konstantin Osipov , tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org On 04 Dec 14:59, Konstantin Osipov wrote: > * Nikita Pettik [19/11/21 10:00]: > > To implement memory quota of prepared statement cache, we have to > > estimate size of prepared statement. This function attempts at that. > > I suggest sql_stmt_est_size() as the name. OK, renamed. > I would add size-caching right away, to make this function cheap. > > if (size != 0) > return size; Does it make any sense? Now for one VM instance it can be called at most three times: twice during insertion and once during deletion. > I wonder if we could use another region for the bytecode to > make this quick & cheap to maintain... > > I don't want to sidetrack this work, though. > > So lgtm. > > > -- > Konstantin Osipov, Moscow, Russia