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: Mon, 4 May 2015 09:21:37 +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 1430727707 6040 80.91.229.3 (4 May 2015 08:21:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 May 2015 08:21:47 +0000 (UTC) Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 04 10:21:46 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 1YpBdJ-0007lE-LK for ged-emacs-devel@m.gmane.org; Mon, 04 May 2015 10:21:45 +0200 Original-Received: from localhost ([::1]:33167 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpBdI-0000dq-I8 for ged-emacs-devel@m.gmane.org; Mon, 04 May 2015 04:21:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpBdF-0000dY-3V for emacs-devel@gnu.org; Mon, 04 May 2015 04:21:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpBdE-0005QT-03 for emacs-devel@gnu.org; Mon, 04 May 2015 04:21:41 -0400 Original-Received: from mail-lb0-x234.google.com ([2a00:1450:4010:c04::234]:33246) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpBdD-0005QO-NN for emacs-devel@gnu.org; Mon, 04 May 2015 04:21:39 -0400 Original-Received: by lbbzk7 with SMTP id zk7so99820000lbb.0 for ; Mon, 04 May 2015 01:21:37 -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=KRZz9PHnJ+AvvUGmbGHmjnAs/VnHJkZb6bgEIYm9tNk=; b=V60v/xaKMceCULC2//RkD2k1fTOkyDqiS1kqHrTqGHLMyjNpUtSin/LEk8ratpBgmA fjCJ6u4DOf/z54YDGvbO4ZK9xgwcIniW7e53mGeL+DtYh2pd3wMP5G/NqA/6YUO8AB9T EfUpJ+u77DnV29/UHuM9njE9rYZcgXW4AA6/uxBjapSyOPI6uisJ6Wz1ENSvLlW0l6j0 fQrwNVZpQr7eLGkHHyvMwr89HUTKjUU62e9tsEK6Ovo11lDxlie6m9dQkiSJD+RZPTq9 OPPrRHPR5zk/jvBP4UQmi5SHkv6uXsdJWhWEoh8q3pHpXJ8KzBYhHNEOwcFC7iLOHwdL /xqw== X-Received: by 10.112.29.180 with SMTP id l20mr17932727lbh.95.1430727697874; Mon, 04 May 2015 01:21:37 -0700 (PDT) Original-Received: by 10.25.150.1 with HTTP; Mon, 4 May 2015 01:21:37 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: xnSRXOfbNOh6kpyWDkAkkQEQ2WI X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::234 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:186173 Archived-At: Firstly, I don't really plan on implementing this lazy-printing anymore, I'm just trying to optimize the printing a bit now. Secondly, how do you see the running time on the profiler? I don't know why it would report 1.3s, given that if I just evaluate (benchmark-run 10 (tabulated-list-print)) I get a result between 6 to 10 seconds total (depending on whether package-hiding is on or off), which means at least 0.6 seconds per run (of course). Maybe the report I sent you was accidentally gathered on a small package-menu (with only Gelpa configured). 0.6s per print is less than the "couple of seconds" I reported earlier, because that was without byte-compiling. Still, I think it's something we can optimize because the benchmark reports 67% of the time was spent garbage collecting. 2015-05-04 1:19 GMT+01:00 Stefan Monnier : >> Yep, that's what I was doing (if you consider 7 ~ 10). >> Here's the command I was running under M-: > >> (progn (profiler-start 'cpu) >> (tabulated-list-print)(tabulated-list-print)(tabulated-list-print)(tabulated-list-print)(tabulated-list-print)(tabulated-list-print)(tabulated-list-print) >> (profiler-report) (profiler-stop)) > > Hmm... but the numbers I saw seemed to indicate a running time of 1.3s, > so that would mean you saw a running time of of 0.2s per call to > tabulated-list-print which seems not to justify the addition > of laziness. > > > Stefan