From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: Lazy printing in tabulated-list-mode Date: Fri, 1 May 2015 19:31:02 +0100 Message-ID: References: Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1430505071 23250 80.91.229.3 (1 May 2015 18:31:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 May 2015 18:31:11 +0000 (UTC) Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 01 20:31:11 2015 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 1YoFiP-0007FP-5k for ged-emacs-devel@m.gmane.org; Fri, 01 May 2015 20:31:09 +0200 Original-Received: from localhost ([::1]:55166 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoFiO-00085g-DZ for ged-emacs-devel@m.gmane.org; Fri, 01 May 2015 14:31:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoFiK-00085P-93 for emacs-devel@gnu.org; Fri, 01 May 2015 14:31:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YoFiJ-0001Ox-BU for emacs-devel@gnu.org; Fri, 01 May 2015 14:31:04 -0400 Original-Received: from mail-la0-x22d.google.com ([2a00:1450:4010:c03::22d]:36166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoFiJ-0001Or-3i for emacs-devel@gnu.org; Fri, 01 May 2015 14:31:03 -0400 Original-Received: by lagv1 with SMTP id v1so68993431lag.3 for ; Fri, 01 May 2015 11:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=Vv5KhhRSRD0SvdDmvmfFWCnZNrtP0eUi2FYdwMxYjuQ=; b=Gf/0w5BXzHncMHIaqNlT0/fVmOZajFgXNrvXSSfvGlafUhOcBAIJQ10bTVjaDrmfbI zp5Yg0PUpdmNXbD7F2CxGhYD4thMxbHpMrOWMUyCL3xRswb4EEBJ+DrHDNhY0TQYRiYw uHBNegpK9uCnCsnMLa+PhvVJnj8SVI5lzNvBPZ2VP9h6tVYFdqet9ct+a5JU72IQsYXC gua0IsSCmrmPX0hJ33N1KccsqzpX1uD35LPkJFXXdqa2Q7HS/f7zoqTOSDBBlC50/+pV oHqG65cTJ7M1hRTwh6hIbi9p30wVEA82ZoZj2lFn/0J39f/OrD53gE6Bmyj0RF8RwFIX 7TmA== X-Received: by 10.112.97.202 with SMTP id ec10mr7312363lbb.4.1430505062232; Fri, 01 May 2015 11:31:02 -0700 (PDT) Original-Received: by 10.25.150.1 with HTTP; Fri, 1 May 2015 11:31:02 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: AN_nV72uur2raQNU92gcHHKoKXw X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:186094 Archived-At: > You mean it's spent in `insert'? Here we go. So: 41% of the samples were in garbage collection. I missed that the first time, but it looks like a pretty big deal. 8% are in sorting the entries. 7% disappear somewhere inside tabulated-list-print-entry. 36% are spent inside tabulated-list-print-col (report snippet pasted below). Out of which: 11% are completely unacounted for 9% are in the following `if' form, but only 2% and 1% are spend on the `apply' and the `insert'. So I think that means `get-text-property' is eating up 6% here? (if (stringp col-desc) (insert (if (get-text-property 0 'help-echo label) label (propertize label 'help-echo help-echo))) (apply 'insert-text-button label (cdr col-desc))) 12% are in a `progn', which I think corresponds to the body of this `when', but I don't know what's responsible for this. (when not-last-col (when (> pad-right 0) (insert (make-string pad-right ?\s))) (insert (propertize (make-string (- next-x x label-width pad-right) ?\s) 'display `(space :align-to ,next-x)))) -------------------------------------------------- - tabulated-list-print-col 2101 36% - let* 1939 34% - let 965 16% - if 702 12% - progn 699 12% - if 333 5% - progn 317 5% insert 53 0% + insert 127 2% put-text-property 37 0% - if 534 9% + apply 132 2% + insert 85 1% + setq 50 0% < 33 0% + and 13 0% or 9 0%