Hello,
Currently im working on a largish CGI script in C, im wondering how I should go around things performance wise.
A large amount of the content is dynamic, should I... Load 'templates' from files/parse them and then add my values? Or run it as a big program outputting it along the way...
like:
Note the dynamic title... (as an eg), Or should I load a template from a file then parse it (what's best for performance? (I know this depends on how im parsing it)).Code:#include <stdio.h> int main(void) { printf("Content-type: text/html\n\n"); printf( "<html>\n" "<head>\n" "<title>%s</title>\n", "Dynamic title!"); }
Also, including stdio.h just to read/write to stdin and stdout adds a lot of overhead to my program, Is there a way to reduce this overhead?
Thanks in advance!



LinkBack URL
About LinkBacks


