[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Performance figures for changed autorevert implementation
From: |
Michael Albinus |
Subject: |
Performance figures for changed autorevert implementation |
Date: |
Thu, 31 Jan 2013 15:02:27 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Hi,
I have collected some performance figures, comparing autorevert with and
without file notification support. All test cases have the same scenario:
- Start "emacs -Q" with exactly one file
- Enable `global-auto-revert-mode'
- Wait for 3600 sec (aka 1 h)
- Dump performance figures
- Kill Emacs
The test file was of length 0, in order to minimize the time to revert
this file if needed. When a file was changed on disk, the command
"echo >$file" was performed outside Emacs.
I did run the test on my laptop (Intel® Core™2 Duo CPU T9300 @ 2.50GHz ×2,
2 GB RAM, Ubuntu 12.04) overnight, no other application did run in parallel.
For several scenarios this test was performed twice, with and without
file notification support (`auto-revert-use-notify' set to t or nil).
Furthermore, the same tests have been performed for local files and for
remote files. In the latter case, the experimental Tramp file name
handler has been used, which is not merged with Emacs trunk yet.
As summary one could say:
* If the file is changed on disk and reverted by Emacs, the file
notification implementation is slower
* If the file is unchanged, but another file in the same directory is
changed, the file notification implementation is slower for local
directories, but faster for remote directories.
* If the file is unchanged, and no other file in the same directory is
changed as well, the file notification implementation is much faster.
For interpretation of the following numbers: `auto-revert-handler' is
the function which checks regularly all buffers whether they shall be
reverted, and which calls `revert-buffer' if needed.
`auto-revert-notify-handler' is the function for handling incoming file
notification events.
Test 1: Change the test file once per second
============================================
Local file, without file notification
Function Name Call Count Elapsed Time Average Time
============================ ========== ============ ============
auto-revert-handler 6487 3.8662873909 0.0005960054
Local file, with file notification
Function Name Call Count Elapsed Time Average Time
============================ ========== ============ ============
auto-revert-handler 6478 3.5982854019 0.0005554623
auto-revert-notify-handler 7142 0.4215819239 5.902...e-05
Remote file, without file notification
Function Name Call Count Elapsed Time Average Time
============================ ========== ============ ============
auto-revert-handler 7208 135.01537626 0.0187313230
Remote file, with file notification
Function Name Call Count Elapsed Time Average Time
============================ ========== ============ ============
auto-revert-handler 7198 142.25203243 0.0197627163
auto-revert-notify-handler 7146 4.4642421369 0.0006247190
Test 2: Don't change the test file, change another file in the same directory
once per second
=============================================================================================
Local file, without file notification
Function Name Call Count Elapsed Time Average Time
============================ ========== ============ ============
auto-revert-handler 5768 0.1576693999 2.733...e-05
Local file, with file notification
Function Name Call Count Elapsed Time Average Time
============================ ========== ============ ============
auto-revert-notify-handler 7134 0.3924119630 5.500...e-05
auto-revert-handler 5744 0.0264933590 4.612...e-06
Remote file, without file notification
Function Name Call Count Elapsed Time Average Time
============================ ========== ============ ============
auto-revert-handler 6480 9.4174383650 0.0014533083
Remote file, with file notification
Function Name Call Count Elapsed Time Average Time
============================ ========== ============ ============
auto-revert-notify-handler 7134 4.3312991959 0.0006071347
auto-revert-handler 6471 0.0270106180 4.174...e-06
Test 3: Don't change any file
=============================
Local file, without file notification
Function Name Call Count Elapsed Time Average Time
============================ ========== ============ ============
auto-revert-handler 5768 0.1542307049 2.673...e-05
Local file, with file notification
Function Name Call Count Elapsed Time Average Time
============================ ========== ============ ============
auto-revert-handler 5768 0.0271623790 4.709...e-06
Remote file, without file notification
Function Name Call Count Elapsed Time Average Time
============================ ========== ============ ============
auto-revert-handler 6489 9.1625807580 0.0014120173
Remote file, with file notification
Function Name Call Count Elapsed Time Average Time
============================ ========== ============ ============
auto-revert-handler 6480 0.0388975389 6.002...e-06
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Performance figures for changed autorevert implementation,
Michael Albinus <=