On 31.07.2012 10:44, Poul-Henning Kamp wrote:
In message <[email protected]>, 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
[email protected] <mailto:[email protected]>
www.unister.de <http://www.unister.de>
Vertretungsberechtigter Geschäftsführer: Thomas Wagner
Amtsgericht Leipzig, HRB: 19056
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc