From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: size of emacs executable after unicode merge Date: Thu, 13 Nov 2008 11:33:40 -0500 Message-ID: <87r65flh5n.fsf@cyd.mit.edu> References: <200805141652.m4EGqikr018644@sallyv1.ics.uci.edu> <200805151529.m4FFTlF1004684@sallyv1.ics.uci.edu> <482D8435.6060407@gnu.org> <20081030101819.GA15223@orion.lan> <200810311507.m9VF7EAl022755@mothra.ics.uci.edu> <873ai7t7fx.fsf@cyd.mit.edu> <87iqqwk672.fsf@cyd.mit.edu> <873ahym8ji.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1226594690 7073 80.91.229.12 (13 Nov 2008 16:44:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Nov 2008 16:44:50 +0000 (UTC) Cc: rms@gnu.org, emanuele.giaquinta@gmail.com, emacs-devel@gnu.org, dann@ics.uci.edu, monnier@iro.umontreal.ca, evilborisnet@netscape.net, jasonr@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 13 17:45:51 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L0fKB-0007Px-0L for ged-emacs-devel@m.gmane.org; Thu, 13 Nov 2008 17:45:43 +0100 Original-Received: from localhost ([127.0.0.1]:42694 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0fJ2-0002dy-Vv for ged-emacs-devel@m.gmane.org; Thu, 13 Nov 2008 11:44:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L0f8S-00072f-7i for emacs-devel@gnu.org; Thu, 13 Nov 2008 11:33:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L0f8P-00071s-NY for emacs-devel@gnu.org; Thu, 13 Nov 2008 11:33:35 -0500 Original-Received: from [199.232.76.173] (port=49244 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0f8P-00071k-5L for emacs-devel@gnu.org; Thu, 13 Nov 2008 11:33:33 -0500 Original-Received: from cyd.mit.edu ([18.115.2.24]:56646) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L0f8J-000744-Qk; Thu, 13 Nov 2008 11:33:27 -0500 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id E177457E09E; Thu, 13 Nov 2008 11:33:40 -0500 (EST) In-Reply-To: (Kenichi Handa's message of "Wed, 12 Nov 2008 15:26:01 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:105652 Archived-At: Kenichi Handa writes: >> > One idea is to have a single boolean vector of size #x110000 >> > (139264 bytes), setup it for CHARSET everytime when we call >> > map-charset-chars for the different charset. In that >> > vector, only the bit for #x3000, #x3001, #x3002, etc are 1 >> > for chinese-gb2312. Then map-charset-chars can know for >> > which characters FUNCTION must be called. > >> but it appears to free a negligible about of memory. > > Did you comment out the calls of unify-charset in > mule-conf.el and change the encoding of all preloaded *.el > files to utf-8? Commenting out the calls to unify-charset does reduce the memory by several megabytes. But I'm not sure I understand your idea correctly. Here's the approach I tried, do you think it is correct? - introduce a variable called inhibit-load-charsets-map, defaulting to nil - In loadup.el, let-bind inhibit-load-charsets-map to t when loading characters.el. - In map_charset_chars, when inhibit-load-charsets-map is non-nil, and the charset method is deferred, don't call load_charset and map_char_table_for_charset. Instead, call a new function map_charset_chars_from_file. - The new function map_charset_chars_from_file reads the code points and character codes from the charset file and applies the function argument passed to map_charset_chars on those codes directly. Would this work?