[glib-networking] Remove a couple hot calls to gettext()
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking] Remove a couple hot calls to gettext()
- Date: Fri, 27 Jul 2018 21:02:25 +0000 (UTC)
commit 1f6717ed8e8d8cf71e91812ac3f3f3a782bf16ef
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Fri Jul 27 15:51:31 2018 -0500
Remove a couple hot calls to gettext()
This was recommended by Olivier CrĂȘte based on profiling results:
https://bugzilla.gnome.org/show_bug.cgi?id=697908#c131
tls/gnutls/gtlsconnection-gnutls.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
index 806e467..2abb20f 100644
--- a/tls/gnutls/gtlsconnection-gnutls.c
+++ b/tls/gnutls/gtlsconnection-gnutls.c
@@ -782,8 +782,9 @@ claim_op (GTlsConnectionGnutls *gnutls,
if (timeout == 0)
{
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK,
- _("Operation would block"));
+ /* Intentionally not translated because this is not a fatal error to be
+ * presented to the user, and to avoid this showing up in profiling. */
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK, "Operation would block");
return FALSE;
}
@@ -2224,8 +2225,9 @@ do_implicit_handshake (GTlsConnectionGnutls *gnutls,
g_task_run_in_thread (priv->implicit_handshake,
async_handshake_thread);
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK,
- _("Operation would block"));
+ /* Intentionally not translated because this is not a fatal error to be
+ * presented to the user, and to avoid this showing up in profiling. */
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK, "Operation would block");
return FALSE;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]