From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1703 invoked by alias); 27 Jan 2016 05:10:32 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37809 Received: (qmail 14565 invoked from network); 27 Jan 2016 05:10:30 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=11DiKd97sDE1EGU+DmhlAhK9CET9z822LffYHtwdsbw=; b=bf+sgwYEt3DSLWos9iFkNFFN85UbKKuuIcXWKAoZDMeQRzImncTcYLzsvnjgnYshTK I2oNz8M5EbeHhoPPURebEZ1q4Y71GfKv+rbRGzru1kHua257eOoMeCxbZNbma5XV4Ayn uM+0MMUAQfKeKibO9+sPLw9yN5GY271L7rKZW+WR8qUiArWgwGx4Y679sHWL4x4PMtn+ UFoC2pcrJSCJgMVKcPaSOBhuZQGVT+2uLFlfE9ABaQv3JrOWtSj0OLlM1RTswolnsU8c sLOF7WVz3EG4qulULDI2cBQ1rmJvMTv+vg4lpYzFk7vuBojNx8PezazfLhv8j7h/59L2 SEkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=11DiKd97sDE1EGU+DmhlAhK9CET9z822LffYHtwdsbw=; b=jBnr4hM6QJrXIxPnYtXy4fSZgz9VBw45tSCrylXps1KMSqVis2TlotwhfhRCFspAff QXbf8xOBFs2xb2mM9acnJ8xmDvN0K7Ry7vD6nr6ncg5YSPjLlK5GQ1WYbbelYenPLm0y xa4uQypkk2QlrkQbDaonKQKl7Yg/lUNWwFjfFYcvPS/IDCftkIwibJHIJNJ71Z5WInxr iNfq8S6KC8PdOH9TceyrkyVhiwpHmOpm34Gf0ChNj91jkeTZ84jp0JTflaByFGuVg2DL hxWlkHgOnhA3szVkpJ2SL6S/3G2SNgBLBU4yQQExtN8PWQClbt0cI98RCj0WtHM4eZkC NW3g== X-Gm-Message-State: AG10YOQiNdo4nofOl3t9QXiNo3GYe8LLdI7cRG4m9cbfVAa0xLGVHZtglggbvqj3/2JsD6GUFC/sTMhbWovGAA== MIME-Version: 1.0 X-Received: by 10.140.224.137 with SMTP id u131mr1305053qhb.58.1453871428031; Tue, 26 Jan 2016 21:10:28 -0800 (PST) In-Reply-To: <160126203105.ZM2779@torch.brasslantern.com> References: <160111233259.ZM6719@torch.brasslantern.com> <160118223126.ZM28565@torch.brasslantern.com> <160119195608.ZM31931@torch.brasslantern.com> <20160123235303.GE20278@tarsus.local2> <160123222057.ZM16192@torch.brasslantern.com> <20160126225008.GB4731@tarsus.local2> <160126203105.ZM2779@torch.brasslantern.com> Date: Wed, 27 Jan 2016 06:10:27 +0100 Message-ID: Subject: Re: Slow highlighting (Re: "drop-in replacement" and transpose-words-match) From: Mikael Magnusson To: Zsh hackers list Content-Type: text/plain; charset=UTF-8 On Wed, Jan 27, 2016 at 5:31 AM, Bart Schaefer wrote: > On Jan 26, 10:50pm, Daniel Shahaf wrote: > } Subject: Re: Slow highlighting (Re: "drop-in replacement" and transpose-wo > } > } fned with z-sy-h is slow. > } > } vared with z-sy-h is slow. > } > } > What about with a history line containing a function definition? > } > } Also slow. > } > } I also tested it as a single line, and that was still slow: > > So, it's not "zed", it's any case where you're doing syntax analysis of > a function definition. > > Time to start eliminating the set of highlighters one by one until you > find one that seems to be the culprit? Glancing at the github pages, > there seem to be several hightlighters on by default. My bet would be > on the one that looks for balanced braces, because there is always an > unmatched open brace lurking at the start of the function. > > Of course it a combination of highlighters may be involved, which would > be more difficult to isolate. If it is the brace matching code, does it use shell code to loop over the buffer, or use the zle widget (vi-match-bracket / match-bracket (i don't think i've committed the latter, the former is a bit finicky to use but it is possible)? I found using shell code is way too slow on anything over a couple hundred characters, whereas the widget is fast enough for anything i've thrown at it. I just tried zed -f zsh_directory_name which is 200 lines long, and everything works fine here with my highlighting code (i don't use z-sy-h). -- Mikael Magnusson