From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: String encoding in json.c Date: Mon, 25 Dec 2017 18:21:13 +0200 Message-ID: <83po72ixs6.fsf@gnu.org> References: <83tvwhjyi5.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1514218793 3019 195.159.176.226 (25 Dec 2017 16:19:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 25 Dec 2017 16:19:53 +0000 (UTC) Cc: p.stephani2@gmail.com, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 25 17:19:48 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 1eTVTg-0000NC-3X for ged-emacs-devel@m.gmane.org; Mon, 25 Dec 2017 17:19:48 +0100 Original-Received: from localhost ([::1]:53537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eTVVd-00021C-8F for ged-emacs-devel@m.gmane.org; Mon, 25 Dec 2017 11:21:49 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eTVUz-00020P-Qe for emacs-devel@gnu.org; Mon, 25 Dec 2017 11:21:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eTVUw-00061z-ND for emacs-devel@gnu.org; Mon, 25 Dec 2017 11:21:09 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43423) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eTVUw-00061h-J1; Mon, 25 Dec 2017 11:21:06 -0500 Original-Received: from [176.228.60.248] (port=2576 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eTVUv-0000tT-JR; Mon, 25 Dec 2017 11:21:06 -0500 In-reply-to: (message from Dmitry Gutov on Sun, 24 Dec 2017 22:48:17 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:221407 Archived-At: > From: Dmitry Gutov > Date: Sun, 24 Dec 2017 22:48:17 +0200 > Cc: emacs-devel@gnu.org > > > The main purpose of Emacs is to be an efficient editor, so if we care > > about the slow-down of code conversions, we should first and foremost > > speed up reading and writing files. JSON conversion, with all due > > respect to them, are not the main business for us, and I'm not even > > sure JSON objects will frequently be as large as files our users visit > > all the time. > > FWIW, a significant use case for json.el is encoding a structure > containing the whole contents of the current buffer as one of the values > (several protocols for external code completion tools use this). OK, but I presume the size of such buffers is rarely more than 1 MByte, say? 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.