<P> CGI is often used to process inputs information from the user and produce the appropriate output . An example of a CGI program is one implementing a Wiki . The user agent requests the name of an entry; the Web server executes the CGI; the CGI program retrieves the source of that entry's page (if one exists), transforms it into HTML, and prints the result . The web server receives the input from the CGI and transmits it to the user agent . If the "Edit this page" link is clicked, the CGI populates an HTML textarea or other editing control with the page's contents, and saves it back to the server when the user submits the form in it . </P> <P> Calling a command generally means the invocation of a newly created process on the server . Starting the process can consume much more time and memory than the actual work of generating the output, especially when the program still needs to be interpreted or compiled . If the command is called often, the resulting workload can quickly overwhelm the server . </P> <P> The overhead involved in process creation can be reduced by techniques such as FastCGI that "prefork" interpreter processes, or by running the application code entirely within the web server, using extension modules such as mod_perl or mod_php . Another way to reduce the overhead is to use precompiled CGI programs, e.g. by writing them in languages such as C or C++, rather than interpreted or compiled - on - the - fly languages such as Perl or PHP, or by implementing the page generating software as a custom webserver module . </P> <P> Alternative approaches include: </P>

Cgi programs can be written in which languages