Question about srcbody in VCL_conf

Gordon Schmidt gordon.schmidt at unister-gmbh.de
Tue Jul 31 11:24:38 CEST 2012


On 31.07.2012 10:44, Poul-Henning Kamp wrote:
> In message <501792EA.5060901 at unister-gmbh.de>, Gordon Schmidt writes:
>
>> By now I have written a small python script to minify the vcl config by
>> removing comments and empty lines and also resolving includes.
>> So i'm using just one VCL-File with 33316 bytes instead of a
>> configuration of 110 vcl files with 41635 bytes in sum.
> It sounds really strange that this should have the performance
> effect you claim...
I didn't get the 8%-10% by minifying - the performance gain with 
minified vcls is lower.
Just for testing, I removed the part in the vcc_compile.c responsable 
for adding scrbody to the compiled object to get the full performance 
improvement.

My changes for testing were:
index 66d89f5..e51833a 100644
--- a/lib/libvcl/vcc_compile.c
+++ b/lib/libvcl/vcc_compile.c
@@ -343,16 +343,7 @@ EmitStruct(const struct vcc *tl)
         }
         Fc(tl, 0, "};\n");

-       Fc(tl, 0, "\nconst char *srcbody[%u] = {\n", tl->nsources);
-       VTAILQ_FOREACH(sp, &tl->sources, list) {
-               Fc(tl, 0, "    /* ");
-               EncString(tl->fc, sp->name, NULL, 0);
-               Fc(tl, 0, "*/\n");
-               Fc(tl, 0, "\t");
-               EncString(tl->fc, sp->b, sp->e, 1);
-               Fc(tl, 0, ",\n");
-       }
-       Fc(tl, 0, "};\n");
+       Fc(tl, 0, "\nconst char *srcbody[%u] = NULL;\n");

         Fc(tl, 0, "\nstatic struct director\t*directors[%d];\n",
             tl->ndirector);


Regards
Gordon

-- 
E-Mail-Signatur

*Gordon Schmidt*
Softwareentwickler - QA

Unister GmbH
Barfußgässchen 11 | 04109 Leipzig

Telefon: +49 (0)341 65050 - 25757
gordon.schmidt at unister.de <mailto:gordon.schmidt at unister.de>
www.unister.de <http://www.unister.de>

Vertretungsberechtigter Geschäftsführer: Thomas Wagner
Amtsgericht Leipzig, HRB: 19056

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120731/7882a1ff/attachment-0001.html>


More information about the varnish-misc mailing list