From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#28227: 26.0.50; Tramp tests are slow Date: Fri, 25 Aug 2017 10:04:24 +0200 Message-ID: <87lgm8dqev.fsf@detlef> References: <878ti81xwb.fsf@chinook> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1503648338 8361 195.159.176.226 (25 Aug 2017 08:05:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 25 Aug 2017 08:05:38 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 28227@debbugs.gnu.org To: Gemini Lasswell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 25 10:05:31 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dl9cE-0001FK-Qh for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Aug 2017 10:05:18 +0200 Original-Received: from localhost ([::1]:52039 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dl9cL-0005LL-Fl for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Aug 2017 04:05:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dl9c4-0005GL-09 for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2017 04:05:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dl9by-0008G8-0n for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2017 04:05:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44828) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dl9bx-0008Fq-TP for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2017 04:05:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dl9bx-00007p-Kc for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2017 04:05:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Aug 2017 08:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28227 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28227-submit@debbugs.gnu.org id=B28227.1503648277447 (code B ref 28227); Fri, 25 Aug 2017 08:05:01 +0000 Original-Received: (at 28227) by debbugs.gnu.org; 25 Aug 2017 08:04:37 +0000 Original-Received: from localhost ([127.0.0.1]:53509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dl9bZ-000078-AZ for submit@debbugs.gnu.org; Fri, 25 Aug 2017 04:04:37 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:63872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dl9bV-00006u-HJ for 28227@debbugs.gnu.org; Fri, 25 Aug 2017 04:04:34 -0400 Original-Received: from detlef.gmx.de ([213.220.151.125]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LfC4q-1dE1mj4C6q-00ooKc; Fri, 25 Aug 2017 10:04:26 +0200 In-Reply-To: <878ti81xwb.fsf@chinook> (Gemini Lasswell's message of "Thu, 24 Aug 2017 14:03:32 -0700") X-Provags-ID: V03:K0:elCyJRsHC9WQ10PGDnkft3lSooJAPhvMo+/8oDln2Hz6f/3vP9F jLcRZ06BfkuxOAudCYIl5duq6vvZ54jSLcy/hE/3fr+nnkkQFAotp6Q9PflbDKcDk3F7HI9 jSlKnRS+OlgWg9PnWvY6hrsFDeFsyD0pTophoZysl2RNIYiAS4OlV0EvsfVjGnFbQ3wneHy ssBbhXmep+9vgrk+GFujw== X-UI-Out-Filterresults: notjunk:1;V01:K0:IXURThgflkY=:J5oIE5ozfB37EXXJqTJpRp rVi7dIMkyWAQH96kr9CrCVThbuf6R375XWvpwIqxZmmxOLhfMFT5BPQzDTOhuFJsgs7H9vDTq vxY0iS8iesf5R9pl+uc1n3BlYrm1JCkvQ8UXBzVkEM3+NZVdf64o00FbuHMPkI+t0p1hLBfyx Nra7PQqO0XB92GQ7Uvyy5fYOZSJOOyA8tDzAPuxmeR80iZan5i+zGKkQoLBGKVVURceDywVsT lTHvPCWpUIngftX8MbsGUumYvCIk7yrToRXWkqFOf1TAO6kz0ap9fDK1twQY5CJXS7fXoa1iY /wLiCEO8yJ3JIUQ/sA90dr/sSEsC0p68P9ZiNDziZxRFvt7ggyS9tZVYKOtN480781BTBsuoK 74TBmoEpM/uAZfs3UqR+Y59EXyR1ljchhB8HS6VhPg+3Q674bVaZfEwdIYDkoZkWn4t8tcuSm +X7vB7eBpRZHgpfUT3HzhQW0HvMW+/bwTv2F4+TZigGpxa0YWzcmAW571UfrZ0t95Jd2JzYSm irUSAWacXtjJZgy3+QVI4Z9DWJ57i+K1HSZOD4RmXEgHGMK0OQj1ztxcqh8QWELD12mkNXELf EgiLzXlgAnDiEP3cnz6obfQmXEB6tfAS32MtbbZ6zevU6wz2IZO0tgcHOj1WLcL3CfG/6XY2m avvNklYSnCs95nw0Cnj2E/tR+bxJDON/zgBfRF5qLjojXVD/0OhztllKu9sX316DOVEXLhAwu 5Cqbjk7tzzJtvmXuRYlFTPaKN+Vt4sV8N/ZUKukFJD3FkEG3u7GJ5HHB4h/d+UVpUYcKRcAN X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:136184 Archived-At: Gemini Lasswell writes: Hi Gemini, > The Tramp tests are the slowest tests in Emacs's test suite, even when > they aren't set up to access a remote machine. Tramp tests are expensive, by design. For example, at the beginning of every single test the Tramp connection is cleared, including cache cleanup. 55 tests, this takes time to reestablish the connection. Furthermore, for all remote process related tests there are timeouts in order to receive proper response. Therefore, in the normal "make check" run of Emacs, some of Tramp tests are skipped. If you start "make -C test tramp-tests", all Tramp tests run, which lasts 3:17 min on my laptop (Lenovo T500, 7 years old). You could restrict this to the non-expensive tests by calling "make SELECTOR='$(SELECTOR_DEFAULT)' -C test tramp-tests". This reduces the runtime to 34 sec on my laptop. See test/README for explanation. For normal use, the non-expensive Tramp tests are sufficient. > After a little investigation I think the cause of the slowness is > excessive memory allocation. I modified ert-run-tests to print > memory statistics after each test and found that tramp-tests.el, which > takes 100 seconds to run on my machine, is spending 39 seconds doing > garbage collection, and by the end of the test run has allocated and > freed 27 million strings. > > Here is a log file with memory statistics: > > And here are the messages I added to ert-run-test's loop: > > (message "GC: %s" (garbage-collect)) > (message "GC count: %s time: %s" gcs-done gc-elapsed) > (message "Memory-use-counts: %s" (memory-use-counts)) Thanks for this. My experience with Tramp is, that most of the time is spent in process communication. Anyway, I'll see, whether I could optimize Tramp somehow, but functionality comes first. Best regards, Michael.