【问题标题】:ssh -X (X11 forwarding) java swing application has slow drop down listsssh -X (X11 forwarding) java swing 应用程序的下拉列表很慢
【发布时间】:2014-11-25 21:56:30
【问题描述】:

症状:

  • 点击下拉列表,其下的所有选项列表大约需要 14 秒才能显示
  • 所有其他 UI 元素都是交互式的;没有明显的延迟
  • 只需 14 毫秒即可 ping 我正在连接的主机

如何加快下拉列表的响应速度?

我运行的命令:

ping <destination host>
PING <destination host> (<destination ip>) 56(84) bytes of data.
64 bytes from <destination host> (<destination ip>): icmp_seq=1 ttl=50 time=16.4 ms


ssh -X <destination host>
java -cp <class path stuff> <class with main method that initializes the UI>

客户端机器信息:

ssh -V
OpenSSH_6.6.1p1 Ubuntu-2ubuntu2, OpenSSL 1.0.1f 6 Jan 2014
cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"

服务器机器信息:

sshd -V
sshd: illegal option -- V
OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
usage: sshd [-46DdeiqTt] [-b bits] [-C connection_spec] [-c host_cert_file]
        [-f config_file] [-g login_grace_time] [-h host_key_file]
        [-k key_gen_time] [-o option] [-p port] [-u len]

java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04 LTS"

【问题讨论】:

  • 在本地运行代码会发生什么?是不是也很慢?我建议发布一个可编译和可运行的问题示例。
  • 还提到客户端和服务器操作系统。
  • 我还添加了操作系统和 JVM 信息

标签: java swing ssh jcombobox x11-forwarding


【解决方案1】:

我找到了一个临时解决方案。我有两台显示器(笔记本电脑和外接显示器)。我禁用了笔记本电脑显示器,它现在运行顺利。此解决方案基于此帖子:Workaround for Slow Java Swing Menus

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-02-03
    • 1970-01-01
    • 2015-08-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多