From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#45926: Tabulated-list-mode wasteful properties Date: Sun, 17 Jan 2021 13:40:02 +0000 Message-ID: <87wnwb1y31.fsf@tcd.ie> References: <20210117073252.k7f2x35lq3labahe@E15-2016.optimum.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2134"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 45926@debbugs.gnu.org To: Boruch Baum Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 17 14:41:27 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l18J4-0000SW-HW for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Jan 2021 14:41:26 +0100 Original-Received: from localhost ([::1]:36028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l18J3-0001mj-0s for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Jan 2021 08:41:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l18Ig-0001ld-O9 for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2021 08:41:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33123) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l18Ig-0004Si-FV for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2021 08:41:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l18Ig-0000a7-AT for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2021 08:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Jan 2021 13:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45926 X-GNU-PR-Package: emacs Original-Received: via spool by 45926-submit@debbugs.gnu.org id=B45926.16108908172167 (code B ref 45926); Sun, 17 Jan 2021 13:41:02 +0000 Original-Received: (at 45926) by debbugs.gnu.org; 17 Jan 2021 13:40:17 +0000 Original-Received: from localhost ([127.0.0.1]:44669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l18Hx-0000Yt-7u for submit@debbugs.gnu.org; Sun, 17 Jan 2021 08:40:17 -0500 Original-Received: from mail-wm1-f48.google.com ([209.85.128.48]:55893) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l18Hr-0000YS-JY for 45926@debbugs.gnu.org; Sun, 17 Jan 2021 08:40:15 -0500 Original-Received: by mail-wm1-f48.google.com with SMTP id c124so11244057wma.5 for <45926@debbugs.gnu.org>; Sun, 17 Jan 2021 05:40:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=vDOsxL3gFKQZeXivM4gb7uHlA261N0yqfmPlqrt5MOA=; b=wd7WLPn82E9eaaXsTPynvlUb7Vvzg54waDF1fUzt/Y61U/R4RJYgIDz70gdZdRDj1+ vgefeJl4nIMGLSAQwLn8pI5nRIcS+NNp7k4KpPDEO14f6duK98RrTN3yM3GUad/PRJs5 dH3D2hkwneVmzQl7afyFojT50t0i0I4YgiBDptVI09PpXYlwFFcGB16InHSVJB0OtEkw VJ8M5AVVyOIrQiC+1Cmf1S5+ek7gVlKgkah9RJXsX1aEyS4GnLhCzXtC0KJHNUSSGyMR Khl5YRG0rAF61C/SYly9zj+moTVt5QpAtTcRrDoswljAAj2NBW6zz5DyOJXZKYW750TR FwEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=vDOsxL3gFKQZeXivM4gb7uHlA261N0yqfmPlqrt5MOA=; b=nrxrC00lRlE8Rn91MzlHB79VovVvlMI/Aehs4TADaE5tHPo54ixSmhuCZ4ghUS5atQ H8ulxv9qYKyDADRxGNOVo7ZhTbh0LXi51BfE13yEN5//MRG4OC10hrLw83eX8Cs14oA3 XIj7G3Vi5RkdjVtmJq79C+w/t0idoiHt0Cp6NW4W9DTLM0TrJw2UjrH2QZVLepLgad6m 9jCrRLHurPWeuFjDKCIlOEUU9nhFh7HV1LttQ7Z4z2vquwg78H1fkfjupvbqIpRTZe8z SZl7Rlx+J0yDPEettUWAI/4hxjpcUkGxjPG1RteDdJZfIJFFZWWYd3GoagomXT0lvzco vTpg== X-Gm-Message-State: AOAM531jTd8JFV6wSfEfbMrVvK/fLAkieSBq9LucyRVOg0Y9wK5qH10d TAFhVthKu1OVug0Ikv4n/IPLYg== X-Google-Smtp-Source: ABdhPJyi5vEh6YKW9cr5cpo3QgW2/7B+YVk+8DZPldRc+0blucwh5mSUGzpcBNUe21QC1OxVfkvQ0Q== X-Received: by 2002:a1c:b682:: with SMTP id g124mr16923904wmf.10.1610890805742; Sun, 17 Jan 2021 05:40:05 -0800 (PST) Original-Received: from localhost ([37.228.235.160]) by smtp.gmail.com with ESMTPSA id q15sm23344302wrw.75.2021.01.17.05.40.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jan 2021 05:40:04 -0800 (PST) In-Reply-To: <20210117073252.k7f2x35lq3labahe@E15-2016.optimum.net> (Boruch Baum's message of "Sun, 17 Jan 2021 02:32:52 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:198049 Archived-At: --=-=-= Content-Type: text/plain Boruch Baum writes: > Tabulated lists can grow quite large. In fact, the most common use for > the mode is the *Packages* buffer listing, which for me today clocks in > at 5211 lines * five columns. In the case of the *Packages* buffer, Performing > > (buffer-substring (point) (line-end-position)) > > on a sampling of lines yields 'PP eval' buffers of length ~500 - ~700 > characters. > > Most of this looks to me to be unnecessary duplicate data. In using the > mode for my own purpose, I see that the mode is putting all data of all > columns in an entry (row) in each and every single column, ie the size > grows exponentially by number of columns (in my personal case, ten > columns). > > This isn't breaking anything, but it looks like bad design unnecessarily > hogging memory and filling buffers with cruft. Are you sure the data is actually duplicated and doesn't share structure? I evaluated that expression over the xref package, and got the attached string. Nothing looks obviously duplicated, except for the shared #N= and #N# structures. Also, some of the repetition of shared structures is probably just due to how string intervals are represented/printed. Not that any of this is necessarily optimal, of course, but it's not immediately alarming to me, either, unless I'm missing something. -- Basil --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=pp-eval.el Content-Transfer-Encoding: quoted-printable #(" xref 1.0.4 available gnu Cr= oss-referencing commands" 0 2 (tabulated-list-id #1=3D#s(package-desc xref (1 0 4) "Cross-referencing commands" ((emacs (26 3))) single "gnu" nil ((:url . "http://elpa.gnu.org/packa= ges/xref.html")) nil) tabulated-list-entry #2=3D[("xref" face package-name f= ont-lock-face package-name follow-link t package-desc #1# action package-me= nu-describe-package) #("1.0.4" 0 5 (font-lock-face package-sta= tus-available)) #("available" 0 9 (font-lock-face package-sta= tus-available)) #("gnu" 0 3 (font-lock-face package-sta= tus-available)) #("Cross-referencing commands= " 0 26 (font-lock-face package-des= cription))]) 2 6 (button (t) category default-button face package-name font-lock-face package-name fo= llow-link t package-desc #1# action package-menu-describe-package tabulated= -list-column-name #3=3D"Package" tabulated-list-id #1# tabulated-list-entry= #2#) 6 7 (tabulated-list-column-name #3# tabulated-list-id #1# tabulated-list-entr= y #2#) 7 33 (display (space :align-to 33) tabulated-list-column-name #3# tabulated-list-id #1# tabulated-list-entr= y #2#) 33 38 (font-lock-face package-status-available help-echo #("Version: 1.0.4" 9 14 (font-lock-face package-status-available)) tabulated-list-column-name #4=3D"Version" tabulated-list-= id #1# tabulated-list-entry #2#) 38 39 (tabulated-list-column-name #4# tabulated-list-id #1# tabulated-list-entr= y #2#) 39 48 (display (space :align-to 48) tabulated-list-column-name #4# tabulated-list-id #1# tabulated-list-entr= y #2#) 48 57 (font-lock-face package-status-available help-echo #("Status: available" 8 17 (font-lock-face package-status-available)) tabulated-list-column-name #5=3D"Status" tabulated-list-i= d #1# tabulated-list-entry #2#) 57 58 (tabulated-list-column-name #5# tabulated-list-id #1# tabulated-list-entr= y #2#) 58 61 (display (space :align-to 61) tabulated-list-column-name #5# tabulated-list-id #1# tabulated-list-entr= y #2#) 61 64 (font-lock-face package-status-available help-echo #("Archive: gnu" 9 12 (font-lock-face package-status-available)) tabulated-list-column-name #6=3D"Archive" tabulated-list-= id #1# tabulated-list-entry #2#) 64 65 (tabulated-list-column-name #6# tabulated-list-id #1# tabulated-list-entr= y #2#) 65 70 (display (space :align-to 70) tabulated-list-column-name #6# tabulated-list-id #1# tabulated-list-entr= y #2#) 70 96 (font-lock-face package-description help-echo #("Description: Cross-referencing commands" 13 39 (font-lock-face package-description)) tabulated-list-column-name "Description" tabulated-list-i= d #1# tabulated-list-entry #2#)) --=-=-=--