glib-networking shows in the profiler
We have been trying to put down our CPU usage and there are 2 points where glib-networking is using a lot of CPU.
- gettext calls in the read/write methods: https://gitlab.gnome.org/GNOME/glib-networking/-/blob/master/tls/openssl/gtlsconnection-openssl.c#L1007 https://gitlab.gnome.org/GNOME/glib-networking/-/blob/master/tls/openssl/gtlsconnection-openssl.c#L928
For this issue I think we can just simply remove the gettext call. I am not even sure it makes much sense translating those strings tbh
- g_tls_log
We are logging for each read / write, this means that we endup for each debug call allocating a string and also calling g_vasprintf for something that then gets dropped by g_log_structured. IMHO in glib-networking we should just simply log things that are > debug and for debug to have a compile option that you can enable. Thoughts @mcatanzaro ?