From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id BF21346971A for ; Wed, 4 Dec 2019 14:59:55 +0300 (MSK) Received: by mail-lj1-f193.google.com with SMTP id e10so7775290ljj.6 for ; Wed, 04 Dec 2019 03:59:55 -0800 (PST) Date: Wed, 4 Dec 2019 14:59:54 +0300 From: Konstantin Osipov Message-ID: <20191204115954.GM6592@atlas> References: <0a6806665bbc165dffc23967be57135a46bbad62.1574277369.git.korablev@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0a6806665bbc165dffc23967be57135a46bbad62.1574277369.git.korablev@tarantool.org> 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: Nikita Pettik Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org * 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. I would add size-caching right away, to make this function cheap. if (size != 0) return size; 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