bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28227: 26.0.50; Tramp tests are slow


From: Michael Albinus
Subject: bug#28227: 26.0.50; Tramp tests are slow
Date: Fri, 25 Aug 2017 10:04:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Gemini Lasswell <gazally@runbox.com> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]