|
From: | Dmitry Gutov |
Subject: | bug#24048: 25.0.95; syntax-ppss can be slow |
Date: | Mon, 25 Jul 2016 15:42:22 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Thunderbird/47.0 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |