From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#24048: 25.0.95; syntax-ppss can be slow Date: Mon, 25 Jul 2016 15:42:22 +0300 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1469450609 27753 80.91.229.3 (25 Jul 2016 12:43:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Jul 2016 12:43:29 +0000 (UTC) To: Aaron Jensen , 24048@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 25 14:43:15 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1bRfE1-0005r6-TI for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Jul 2016 14:43:14 +0200 Original-Received: from localhost ([::1]:60406 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRfE1-0000he-6s for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Jul 2016 08:43:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRfDt-0000bD-Kv for bug-gnu-emacs@gnu.org; Mon, 25 Jul 2016 08:43:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRfDq-00053F-71 for bug-gnu-emacs@gnu.org; Mon, 25 Jul 2016 08:43:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRfDq-00053B-3S for bug-gnu-emacs@gnu.org; Mon, 25 Jul 2016 08:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bRfDp-0005SU-VM for bug-gnu-emacs@gnu.org; Mon, 25 Jul 2016 08:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Jul 2016 12:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24048 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24048-submit@debbugs.gnu.org id=B24048.146945055220945 (code B ref 24048); Mon, 25 Jul 2016 12:43:01 +0000 Original-Received: (at 24048) by debbugs.gnu.org; 25 Jul 2016 12:42:32 +0000 Original-Received: from localhost ([127.0.0.1]:36370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRfDL-0005Rk-NH for submit@debbugs.gnu.org; Mon, 25 Jul 2016 08:42:31 -0400 Original-Received: from mail-wm0-f45.google.com ([74.125.82.45]:37857) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRfDK-0005RX-Lk for 24048@debbugs.gnu.org; Mon, 25 Jul 2016 08:42:31 -0400 Original-Received: by mail-wm0-f45.google.com with SMTP id i5so154831130wmg.0 for <24048@debbugs.gnu.org>; Mon, 25 Jul 2016 05:42:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=gwGtqI9wL4EXy5nInESWqICd6ZGutrxmAFdnXzBF0jI=; b=FnVbGYKOAx/2p5oJzs6cNB67kcx7H5/YimDvPPoX5pJKurylqnhC0ds+8tfoCLoogw Z5oOlYbCYRc42CaibxcHfPC1ukANgbn/DMdfXIRG5alEkPfTJtFidQbvwljnI9sLrPm+ gL/+am4rgfwrXcwqaaGlVmNQK9RTOP5hO4PdXd3BntcftaFblQYcxq/vR7IMLHLzFYkL 7j12xEpMgsFVdC1cUa4WqOXPSaxzUZouEwTxXWxH3unwxzjFcnJc0fF2fjbtI3ObNYT2 /Y9MwzVpqnsjXD8Ys1EoTPfJRTxYrZ2Cklk0+bCUwJIdLO1ErSd4YJwJsw/4wS56wMZs nNqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=gwGtqI9wL4EXy5nInESWqICd6ZGutrxmAFdnXzBF0jI=; b=J3BFQ9m2Yw5W3xG2ZbE4T8HDlRHG5oFx9VisTDx8fyoDti3Fo1QfcUtkhfuNCiqL4m ABp3IObicHeB2UbUH6zXCiAE00PWo0d7Wy0jwox56nWdpmN3OVR1lOmh6EMDV1biCsv4 +zOELSz0BDVE+sPZ9CVFIp6YXFkNoC0T6cEzjdSuC8jvEHqL4JgUMhk/TDwg9PA/JkKd kr7HXxYzT0DiO4SSb4Li3HZFKYkV3KSL9wTpwt1gYZjCmYyVZsDs+uex41nTD8failhg qUQ7GWQHGdsQqPJowN/bX9kzE0il5HMq0xffURnx6DExP9ZbV7MHH7kn89erj3Yh0TFA I/dg== X-Gm-Message-State: AEkoouvXV+OgCVwGvaRAJpr+pZRJCUbPqomIU0wXOJscFwdVe4FlZjrmV3ju/4F9MXBYoA== X-Received: by 10.194.127.37 with SMTP id nd5mr15177935wjb.156.1469450544988; Mon, 25 Jul 2016 05:42:24 -0700 (PDT) Original-Received: from [192.168.0.185] (static-nbl2-118.cytanet.com.cy. [212.31.107.118]) by smtp.googlemail.com with ESMTPSA id t188sm27276254wme.19.2016.07.25.05.42.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jul 2016 05:42:24 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Thunderbird/47.0 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:121513 Archived-At: On 07/25/2016 10:12 AM, Aaron Jensen wrote: > Sure, just use elixir-mode and this > file https://gist.githubusercontent.com/aaronjensen/d4cd40347a916dd36c8239afecf64a7d/raw/b52440bb51b96193a365a7f4cc1c8733ba98476f/syntax-ppss-slow-repro.ex > > Then do: (benchmark 100 '(syntax-ppss)) at the top of the file and > compare it to doing it within the `chunk_by` function at the bottom of > the file. For me it’s 0.2ms at the top and 5.6ms at the bottom. > Smartparens can do 50-100 syntax-ppss calls for every > self-insert-command, and 5.6ms is significant latency to add on to every > keypress. Is 5.6ms really significant? You should be typing like 200 characters per _second_ to really notice the difference. Even 12ms that I'm getting at the bottom of your example file doesn't sound like it should have effect on the perceptible latency.