[master] b682b6917 take note of an optimization we might want eventually
Nils Goroll
nils.goroll at uplex.de
Thu Jan 21 11:31:07 UTC 2021
commit b682b6917506f2590a01a0760babc71ae78a7aae
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Thu Jan 21 12:27:51 2021 +0100
take note of an optimization we might want eventually
... which is not important enough for me to tackle it right now, in
particular because I really do not understand enough about how this code
works yet, e.g. which of the if() blocks can possibly happen in which
order. *cough* fsm? *cough*
diff --git a/bin/varnishd/cache/cache_esi_deliver.c b/bin/varnishd/cache/cache_esi_deliver.c
index bf75ef217..87cb9d03d 100644
--- a/bin/varnishd/cache/cache_esi_deliver.c
+++ b/bin/varnishd/cache/cache_esi_deliver.c
@@ -627,6 +627,16 @@ ved_gzgz_init(struct vdp_ctx *vdc, void **priv, struct objcore *oc)
return (0);
}
+/*
+ * XXX: for act == VDP_END || act == VDP_FLUSH, we send a flush more often than
+ * we need. The VDP_END case would trip our "at most one VDP_END call" assertion
+ * in VDP_bytes(), but ved_bytes() covers it.
+ *
+ * To avoid unnecessary chunks downstream, it would be nice to re-structure the
+ * code to intendify the last block, send VDP_END/VDP_FLUSH for that one and
+ * VDP_NULL for anything before it.
+ */
+
static int v_matchproto_(vdp_bytes_f)
ved_gzgz_bytes(struct vdp_ctx *vdx, enum vdp_action act, void **priv,
const void *ptr, ssize_t len)
More information about the varnish-commit
mailing list