连续喝着酒跑很多前任,速度很快

连续喝着酒跑很多前任,速度很快

用 wine 启动 Windows exe 很慢,因为需要首先初始化 wine,这很慢(映射和链接大量 dll、分析配置文件、映射资源等)。

我认为如果 wine 可以像守护进程一样运行,可以将其上下文提供给新启动的 exe,那么它可以显着缩短 exe 的启动时间。尽管在进程之间传输一些资源(文件描述符、映射)并不容易,而且并不总是 posix 标准,但在较新的 Linux 内核中,这已经是可能的。

据我所知,wine中有一个wineserver,但不幸的是我在Google中没有找到太多关于它的信息。

是否已经存在一些类似的?或者也可以用当前的 wineserver 来完成吗?

答案1

当前的 wineserver(截至 2017 年)已经做到了这一点。至少这是我从 wineserver 手册页的这一部分中了解到的:

   -p[n], --persistent[=n]
          Specify the wineserver persistence delay,  i.e.  the  amount  of
          time that the server will keep running when all client processes
          have terminated. This avoids  the  cost  of  shutting  down  and
          starting  again  when programs are launched in quick succession.
          The timeout n is in seconds, the default value is 3 seconds.  If
          n is not specified, the server stays around forever.

据我了解 wineserver 将从第一次调用 wine 开始。 wine 退出后,wineserver 将停留 3 秒。如果在 3 秒内有第二次 wine 调用,则现有的 wineserver 将被重用。

相关内容