From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: String encoding in json.c Date: Mon, 25 Dec 2017 22:51:22 +0200 Message-ID: <5e8f561a-fac1-1dbb-1686-d04ef4dfa42c@yandex.ru> References: <83tvwhjyi5.fsf@gnu.org> <83po72ixs6.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1514235026 2071 195.159.176.226 (25 Dec 2017 20:50:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 25 Dec 2017 20:50:26 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Thunderbird/58.0 Cc: p.stephani2@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 25 21:50:21 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eTZhP-0008Ke-O7 for ged-emacs-devel@m.gmane.org; Mon, 25 Dec 2017 21:50:15 +0100 Original-Received: from localhost ([::1]:34956 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eTZjO-0001Se-AW for ged-emacs-devel@m.gmane.org; Mon, 25 Dec 2017 15:52:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eTZie-0001S4-6z for emacs-devel@gnu.org; Mon, 25 Dec 2017 15:51:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eTZiZ-0006J9-HM for emacs-devel@gnu.org; Mon, 25 Dec 2017 15:51:32 -0500 Original-Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:45252) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eTZiZ-0006F7-9C; Mon, 25 Dec 2017 15:51:27 -0500 Original-Received: by mail-wm0-x233.google.com with SMTP id 9so32816144wme.4; Mon, 25 Dec 2017 12:51:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=fwKrrzhzNZIZQ/k/eSmR+po6OPqhWOjT+w4Wm0m89x4=; b=dQcAHmnoZvnC2T4Lsmsa1mC+yT8zs+4sz0di1RxS9UOS6QiveFZaSE2A12mzhjKxap rCekeyy+/VxcyyIgRc3S2MyrkuWnrtAqavRMNqa7RRP5HwSIVlGkVQo8UQ18bO1tc3Ze Q/Kp3XskzjwggH1/JL0rLeTw4RBOmbjZHDloqORXHEoifiO6fA+8422kRI8p0gQfL1Zi JHDBtze7Es/0+XOAkhJlxZ6T3FTBeNkfg4T4Ng6ozevCk0TsFpE+H2auJm7Yj83ltbAa 6SyNhTP3UgvuxQyuf3IRFDrRI1Votyws94RGBOJQxKLPNmRKt2Z+O6h7aRU67ScR7sp0 CY3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fwKrrzhzNZIZQ/k/eSmR+po6OPqhWOjT+w4Wm0m89x4=; b=GJmj287/e2YWbiUKAyRFsHwdo6ZqPMPK8/Q1HgJuaCpae1o8ccasoESRKqUIg8LzDM 9Rx1FJTzBlrdri0TuKpyGs+K4GJ92oqdLg0dUqE3O75X2skrQ8AgItAqkyNgFOq9Hsqe /pOr1Sw3afduJ333sC67rQaZ6nIkYlO01OxMwrKAuCKd4SHfE5A5jY8BzRifRlcuYW1h pJgAJfGmBuO/EyjxA+5tqSfs6v8rdHoetnZsnLdf9UqW6OlL0zhFEmWuIZchLyjcc42X B/57OT1SsarEG5m4gYgZXWb2BUVBu1nPE4kgBSMPbbVXoJlAmzH20z1QbS5P/9UGaa83 jCFg== X-Gm-Message-State: AKGB3mLLCLdwQHgiYV0Cfd68ye9VVxEr9KSkTlET0dSNM20DGDgVvc2G o431YcxB/i1lVb1AQpX6R3LEUjpJ X-Google-Smtp-Source: ACJfBov61yoCK9a/lKzErIrE4SgeuTuxZ8JUFPMh9ebIevSmlv4KRpgWNZHf9W7vTnw2fJVNY2JVOA== X-Received: by 10.80.171.22 with SMTP id s22mr28945932edc.67.1514235085667; Mon, 25 Dec 2017 12:51:25 -0800 (PST) Original-Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id d3sm24766701edc.15.2017.12.25.12.51.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Dec 2017 12:51:24 -0800 (PST) In-Reply-To: <83po72ixs6.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::233 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:221408 Archived-At: On 12/25/17 6:21 PM, Eli Zaretskii wrote: > OK, but I presume the size of such buffers is rarely more than 1 > MByte, say? Maybe not. This bug report: https://github.com/abingham/emacs-ycmd/issues/163 mentioned large translation units, but I'm not sure which exact sizes are in play. The reproduction scenario used a 300 KB example, encoding which was quite slow at the time. > Files we visit are quite frequently much larger. Which > is why I say that if the speed of en/decoding is crucial, we should > first and foremost work on speeding up file I/O. If you mean I/O in general, maybe. I'm not sure which encoding speeds json.c allows us now. But the JSON structure I was talking about is not written to a file. It's sent over the network (usually to a local TCP socket).