[gnome-remote-desktop] rdp-server: Run primitives benchmark when the server starts
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-remote-desktop] rdp-server: Run primitives benchmark when the server starts
- Date: Fri, 3 Sep 2021 09:34:42 +0000 (UTC)
commit 71b48f4302f2269f0cc92e30c2f0a24a92d1a3b8
Author: Pascal Nowack <Pascal Nowack gmx de>
Date: Wed Mar 17 10:40:50 2021 +0100
rdp-server: Run primitives benchmark when the server starts
For different actions, like colour conversion, FreeRDP uses the FreeRDP
primitives.
When using the FreeRDP primitives the first time, FreeRDP runs a small
benchmark.
This benchmark can take up to ~310ms. Running the benchmark earlier
(, when the server starts), saves that time, when the first RDP client
connects.
So, add a primitives_get() call, when the RDP server initializes to
ensure that the benchmark won't have to run any more, when the user
connects.
src/grd-rdp-server.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/grd-rdp-server.c b/src/grd-rdp-server.c
index 5144b77..3eb13a1 100644
--- a/src/grd-rdp-server.c
+++ b/src/grd-rdp-server.c
@@ -23,6 +23,7 @@
#include <freerdp/channels/channels.h>
#include <freerdp/freerdp.h>
+#include <freerdp/primitives.h>
#include <gio/gio.h>
#include <winpr/ssl.h>
@@ -220,6 +221,11 @@ grd_rdp_server_init (GrdRdpServer *rdp_server)
{
winpr_InitializeSSL (WINPR_SSL_INIT_DEFAULT);
WTSRegisterWtsApiFunctionTable (FreeRDP_InitWtsApi ());
+
+ /*
+ * Run the primitives benchmark here to save time, when initializing a session
+ */
+ primitives_get ();
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]