From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: handa@gnu.org (K. Handa) Newsgroups: gmane.emacs.devel Subject: Re: Enlarge MAX_ALLOCA? Date: Sat, 21 Jun 2014 22:01:56 +0900 Message-ID: <874mzetnzv.fsf@gnu.org> References: <83lhsssq1b.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1403355849 12694 80.91.229.3 (21 Jun 2014 13:04:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Jun 2014 13:04:09 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 21 15:04:02 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WyKxc-0007yb-EM for ged-emacs-devel@m.gmane.org; Sat, 21 Jun 2014 15:04:00 +0200 Original-Received: from localhost ([::1]:44900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WyKxZ-00023c-SN for ged-emacs-devel@m.gmane.org; Sat, 21 Jun 2014 09:03:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54369) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WyKvo-0007eS-FN for emacs-devel@gnu.org; Sat, 21 Jun 2014 09:02:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WyKvj-0000Q6-2X for emacs-devel@gnu.org; Sat, 21 Jun 2014 09:02:08 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WyKvj-0000Q2-0F for emacs-devel@gnu.org; Sat, 21 Jun 2014 09:02:03 -0400 Original-Received: from fl1-125-197-74-119.iba.mesh.ad.jp ([125.197.74.119]:39009 helo=wanchai) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1WyKvi-0007Xd-9J; Sat, 21 Jun 2014 09:02:02 -0400 Original-Received: from handa by wanchai with local (Exim 4.80) (envelope-from ) id 1WyKvd-0007vr-2w; Sat, 21 Jun 2014 22:01:57 +0900 In-Reply-To: <83lhsssq1b.fsf@gnu.org> (message from Eli Zaretskii on Thu, 19 Jun 2014 21:38:40 +0300) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:172600 Archived-At: In article <83lhsssq1b.fsf@gnu.org>, Eli Zaretskii writes: > That buffer is fixed in size, I don't know what. Perhaps it's hard to > know in advance how much we will need. I hope Handa-san could explain. The reason of making it fixed size is that I was just lazy and didn't expect that decoder/encoder were called so frequently. :-( The reaons of 0x4000 was that most of the elisp files in lisp/language were less than 0x4000 characters. And, yes, we can estimate the actually necessarey CHARBUF_SIZE as coding->src_bytes on decoding, and coding->src_chars on encoding. By the way, perhaps the most effective way for making ENCODE_FILE faster and less memory-touching is to change encode_file_name return FNAME when FNAME contains ASCII only or file-name-coding-system is utf-8. --- Kenichi Handa handa@gnu.org