diff options
| author | Po Lu | 2022-11-18 09:08:59 +0800 |
|---|---|---|
| committer | Po Lu | 2022-11-18 09:09:10 +0800 |
| commit | 32e29afe64897c2ba821e1c2edc2b7d2eb74e70f (patch) | |
| tree | e2e1ef06d23f5654c9e435019d4e6e560f8bf2b4 /etc/PROBLEMS | |
| parent | 682b068ba712075cea34d8bc790620ba82169d6c (diff) | |
| download | emacs-32e29afe64897c2ba821e1c2edc2b7d2eb74e70f.tar.gz emacs-32e29afe64897c2ba821e1c2edc2b7d2eb74e70f.zip | |
Add knob to make `mouse-position' faster on X
* etc/PROBLEMS (Improving performance with slow X connections):
Add new advice.
* src/xterm.c (XTmouse_position): Add alternative
implementations for slow connections.
(syms_of_xterm): Add new variable to enable them.
* src/xterm.h (struct x_display_info): Update commentary.
Diffstat (limited to 'etc/PROBLEMS')
| -rw-r--r-- | etc/PROBLEMS | 56 |
1 files changed, 40 insertions, 16 deletions
diff --git a/etc/PROBLEMS b/etc/PROBLEMS index aaecc41f6e8..2169ed0f80b 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS | |||
| @@ -1640,16 +1640,21 @@ X expects to find it. | |||
| 1640 | 1640 | ||
| 1641 | *** Improving performance with slow X connections. | 1641 | *** Improving performance with slow X connections. |
| 1642 | 1642 | ||
| 1643 | There are several ways to improve this performance, any subset of which can | 1643 | There are several ways to improve this performance, any subset of |
| 1644 | be carried out at the same time: | 1644 | which can be carried out at the same time: |
| 1645 | 1645 | ||
| 1646 | 1) If you don't need X Input Methods (XIM) for entering text in some | 1646 | 1) Use the "--with-x-toolkit=no" build of Emacs. By not relying on |
| 1647 | any toolkit (exhibiting potentially slow behavior), it has been | ||
| 1648 | made very fast over networks exhibiting high latency, but suitable | ||
| 1649 | bandwidth. | ||
| 1650 | |||
| 1651 | 2) If you don't need X Input Methods (XIM) for entering text in some | ||
| 1647 | language you use, you can improve performance on WAN links by using | 1652 | language you use, you can improve performance on WAN links by using |
| 1648 | the X resource useXIM to turn off use of XIM. This does not affect | 1653 | the X resource useXIM to turn off use of XIM. This does not affect |
| 1649 | the use of Emacs's own input methods, which are part of the Leim | 1654 | the use of Emacs's own input methods, which are part of the Leim |
| 1650 | package. | 1655 | package. |
| 1651 | 1656 | ||
| 1652 | 2) If the connection is very slow, you might also want to consider | 1657 | 3) If the connection is very slow, you might also want to consider |
| 1653 | switching off scroll bars, menu bar, and tool bar. Adding the | 1658 | switching off scroll bars, menu bar, and tool bar. Adding the |
| 1654 | following forms to your .emacs file will accomplish that, but only | 1659 | following forms to your .emacs file will accomplish that, but only |
| 1655 | after the initial frame is displayed: | 1660 | after the initial frame is displayed: |
| @@ -1665,26 +1670,45 @@ be carried out at the same time: | |||
| 1665 | Emacs.menuBar: off | 1670 | Emacs.menuBar: off |
| 1666 | Emacs.toolBar: off | 1671 | Emacs.toolBar: off |
| 1667 | 1672 | ||
| 1668 | 3) Use ssh to forward the X connection, and enable compression on this | 1673 | 4) Use ssh to forward the X connection, and enable compression on this |
| 1669 | forwarded X connection (ssh -XC remotehostname emacs ...). | 1674 | forwarded X connection (ssh -XC remotehostname emacs ...). |
| 1670 | 1675 | ||
| 1671 | 4) Use lbxproxy on the remote end of the connection. This is an interface | 1676 | Keep in mind that this does not help with latency problems, only |
| 1672 | to the low bandwidth X extension in most modern X servers, which | 1677 | andwidth ones. |
| 1673 | improves performance dramatically, at the slight expense of correctness | 1678 | |
| 1674 | of the X protocol. lbxproxy achieves the performance gain by grouping | 1679 | 5) Use lbxproxy on the remote end of the connection. This is an |
| 1675 | several X requests in one TCP packet and sending them off together, | 1680 | interface to the low bandwidth X extension in some outdated X |
| 1676 | instead of requiring a round-trip for each X request in a separate | 1681 | servers, which improves performance dramatically, at the slight |
| 1677 | packet. The switches that seem to work best for emacs are: | 1682 | expense of correctness of the X protocol. lbxproxy achieves the |
| 1678 | -noatomsfile -nowinattr -cheaterrors -cheatevents | 1683 | performance gain by grouping several X requests in one TCP packet |
| 1679 | Note that the -nograbcmap option is known to cause problems. | 1684 | and sending them off together, instead of requiring a round-trip |
| 1680 | For more about lbxproxy, see: | 1685 | for each X request in a separate packet. The switches that seem to |
| 1686 | work best for emacs are: -noatomsfile -nowinattr -cheaterrors | ||
| 1687 | -cheatevents Note that the -nograbcmap option is known to cause | ||
| 1688 | problems. For more about lbxproxy, see: | ||
| 1681 | http://www.x.org/archive/X11R6.8.0/doc/lbxproxy.1.html | 1689 | http://www.x.org/archive/X11R6.8.0/doc/lbxproxy.1.html |
| 1682 | 1690 | ||
| 1683 | 5) If copying and killing is slow, try to disable the interaction with the | 1691 | Keep in mind that lbxproxy and the LBX extension are now obsolete. |
| 1692 | |||
| 1693 | 6) If copying and killing is slow, try to disable the interaction with the | ||
| 1684 | native system's clipboard by adding these lines to your .emacs file: | 1694 | native system's clipboard by adding these lines to your .emacs file: |
| 1695 | |||
| 1685 | (setq interprogram-cut-function nil) | 1696 | (setq interprogram-cut-function nil) |
| 1686 | (setq interprogram-paste-function nil) | 1697 | (setq interprogram-paste-function nil) |
| 1687 | 1698 | ||
| 1699 | 7) If selecting text with the mouse is slow, the main culprit is | ||
| 1700 | likely `select-active-regions', coupled with a program monitoring | ||
| 1701 | the clipboard on the X server you are connected to. Try turning | ||
| 1702 | that off. | ||
| 1703 | |||
| 1704 | However, over networks with moderate to high latency, with no | ||
| 1705 | clipboard monitor running, the bottleneck is likely to be | ||
| 1706 | `mouse-position' instead. Set the variable | ||
| 1707 | `x-use-fast-mouse-position' to either any non-nil value, or to the | ||
| 1708 | symbol `really-fast' if that is still too slow. Doing so will also | ||
| 1709 | cause Emacs features that relies on accurate mouse position | ||
| 1710 | reporting to stop working reliably. | ||
| 1711 | |||
| 1688 | *** Emacs gives the error, Couldn't find per display information. | 1712 | *** Emacs gives the error, Couldn't find per display information. |
| 1689 | 1713 | ||
| 1690 | This can result if the X server runs out of memory because Emacs uses | 1714 | This can result if the X server runs out of memory because Emacs uses |