From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.devel Subject: Re: Redisplay: NS port, high CPU load Date: Fri, 10 Jun 2016 04:03:57 +1000 Message-ID: References: <9793F9E3-979A-4888-8662-F6E0C27C8B37@gmail.com> <20160608195552.GA66865@breton.holly.idiocy.org> <7B0CAF99-689D-4128-8E33-7D9BA8F1823E@gmail.com> <41E503B6-5048-4E20-92CE-1FAD4C05A279@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1465499717 8454 80.91.229.3 (9 Jun 2016 19:15:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Jun 2016 19:15:17 +0000 (UTC) Cc: Alan Third , Emacs-Devel devel To: Anders Lindgren Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 09 21:15:12 2016 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 1bB5Q8-0006n7-GI for ged-emacs-devel@m.gmane.org; Thu, 09 Jun 2016 21:15:12 +0200 Original-Received: from localhost ([::1]:36605 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB5Q7-0005bs-D7 for ged-emacs-devel@m.gmane.org; Thu, 09 Jun 2016 15:15:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB4JO-0005u3-SY for emacs-devel@gnu.org; Thu, 09 Jun 2016 14:04:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bB4JI-000616-Qd for emacs-devel@gnu.org; Thu, 09 Jun 2016 14:04:09 -0400 Original-Received: from mail-pa0-x229.google.com ([2607:f8b0:400e:c03::229]:35124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB4JI-000612-KP for emacs-devel@gnu.org; Thu, 09 Jun 2016 14:04:04 -0400 Original-Received: by mail-pa0-x229.google.com with SMTP id hl6so15356460pac.2 for ; Thu, 09 Jun 2016 11:04:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Lo7t6R187hddZNRSTU6cdU4fodLqJuF/7NqywPaZGXw=; b=ncK5TwEyW/gJ2e4CsHl9OdGVws0iuWzDfLkktzcQfwJMV59XxXAbsnL1LtHyobm293 kx6Mv5KpKN0McE8EI2lx46VpcCOs4fOKmxWhM9kL4wfqFhgVMJ+KPDwBq3iFNWIZQuNr 1dk4q0eqK5JRiknBkaiw/qSUejTtf1yV4hdxxh3zAfs9QAFbBNbDaqLGyshuIIMdys4m pDSkYOChhXETK6GHitM9RaTP36DoVOIvkdSvayC90ZJlkjpt2zvaPNGoR01Il9iE9Xzg H29syT0vlihhSJfgqJb5/qL/l0QPLuHnfsR/WlzlLFvBoqTjI1MTq9w26INj9gDr8RA8 o5Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Lo7t6R187hddZNRSTU6cdU4fodLqJuF/7NqywPaZGXw=; b=PMgovV7mtGSgx3NuK5I/vH3sS884tL619iT3D6cRJM1JXw/Ci4ZQjBf7r/Zwhj6/xV vgG0TgHCZi3aGPbp5yO0TLClsYlzPlgEE/RzTnsUkJUvFseYAUEtTlCyEpCX0XHpEbHh Na9Pnv4x40BDZ56bq2c4pHNirHkkHRDkjV3BG+gvJYrmn+SL+Zl8PJBEloPqq0799wPB vNLQKOivoUA3PCCEw8x5wRa9zbT3WA9szBpmwMWklFgcZ4x4qdUM7sh1GuiXf6UyjMga Qj94RmdqtdqeqPu0B1XXrfWWw4Ev5vrEVDgqwOZP37FYfRwX8nt0Ii6WW7ICVEMluufa /M4A== X-Gm-Message-State: ALyK8tJ4SRxVz5PpLEzED87geQ29VmfTtLddikPLQ21reQEcBavNP6Xie+mK9DNvYSAZYQ== X-Received: by 10.66.172.49 with SMTP id az17mr13701027pac.104.1465495443691; Thu, 09 Jun 2016 11:04:03 -0700 (PDT) Original-Received: from [10.1.1.14] (203-206-29-127.dyn.iinet.net.au. [203.206.29.127]) by smtp.gmail.com with ESMTPSA id s8sm11525903pav.39.2016.06.09.11.04.00 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Jun 2016 11:04:02 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3124) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c03::229 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:204259 Archived-At: On Jun 10, 2016, at 12:11 AM, Anders Lindgren wrote: > Try to clear out one of :post-read-conversion and = :pre-write-conversion to see which of the two is the culprit. (While = you're at it, try to clear out both first just to make sure we're = barking up the right tree.) Bingo. I had a look at the function and it=E2=80=99s the `insert=E2=80=99= into the temporary buffer that is causing this. ;; Pre-write conversion for `utf-8-hfs'. (defun ucs-normalize-hfs-nfd-pre-write-conversion (from to) (let ((old-buf (current-buffer))) (set-buffer (generate-new-buffer " *temp*")) (if (stringp from) (insert from) (insert-buffer-substring old-buf from to)) (ucs-normalize-HFS-NFD-region (point-min) (point-max)) nil)) old-buf here is *code-conversion-work*. I don=E2=80=99t understand this pre-write-conversion function. = According to the documentation of `define-coding-system=E2=80=99, why = would it make a new buffer and switch to it? > VALUE must be a function to call after all functions in > =E2=80=98write-region-annotate-functions=E2=80=99 and = =E2=80=98buffer-file-format=E2=80=99 are > called, and before the text is encoded by the coding system > itself. This function should convert the whole text in the > current buffer. For backward compatibility, this function is > passed two arguments which can be ignored.