On Monday, August 5, 2019, at 10:17 PM +01, Oisín Mac Fhearaí wrote: > I was able to [...] update the Dockerfile to build Ur/web from the > latest release tarball [...] and compare the benchmarks with the version > installed with apt from the Ubuntu repo. The version built from the > latest release was over ten times faster, even running on my old laptop.
On Tuesday, August 6, 2019, at 1:59 PM -04, Adam Chlipala wrote: > I've asked the Debian packager if he can think of some build-process > change there that would have introduced a slowdown. Hi, Debian packager here. Sorry for the latency of this reply – I hope nobody’s been racking their brain trying to figure this one out. This is in fact an issue with the Debian packaging. In particular, upstream Ur/Web builds the runtime with -U_FORTIFY_SOURCE, but Debian builds it with -D_FORTIFY_SOURCE=2. This causes a truly impressive slowdown, as you can read about in https://bugs.debian.org/934722. I’m going to do a bit more digging to see if I can understand the issue further, but I expect I’ll just end up downgrading the Debian package to -D_FORTIFY_SOURCE=1. I expect this has no performance impact, but Oisín, if you want to check me, you can patch Ur/Web master with --8<-----------------cut here------------------start--------------->8--- diff --git a/src/c/Makefile.am b/src/c/Makefile.am index 95582793..ad8cbd3e 100644 --- a/src/c/Makefile.am +++ b/src/c/Makefile.am @@ -7,7 +7,7 @@ liburweb_fastcgi_la_SOURCES = fastcgi.c fastcgi.h liburweb_static_la_SOURCES = static.c AM_CPPFLAGS = -I$(srcdir)/../../include/urweb $(OPENSSL_INCLUDES) $(ICU_INCLUDES) -AM_CFLAGS = -Wall -Wunused-parameter -Werror -Wno-format-security -Wno-deprecated-declarations -U_FORTIFY_SOURCE $(PTHREAD_CFLAGS) +AM_CFLAGS = -Wall -Wunused-parameter -Werror -Wno-format-security -Wno-deprecated-declarations -D_FORTIFY_SOURCE=1 $(PTHREAD_CFLAGS) liburweb_la_LDFLAGS = $(AM_LDFLAGS) $(OPENSSL_LDFLAGS) \ -export-symbols-regex '^(client_pruner|pthread_create_big|strcmp_nullsafe|uw_.*)' \ -version-info 1:0:0 --8<-----------------cut here------------------end----------------->8--- and give the benchmarks another shot. _______________________________________________ Ur mailing list Ur@impredicative.com http://www.impredicative.com/cgi-bin/mailman/listinfo/ur