Why is cgi so slow




















You can use Servlets with java. But it all depends what exactly you want to do. Pound for pound, it would likely be faster, but perhaps not by as much as you think for the common web request.

A compromise is to move lengthy calculations outside of the language through a native function interface, e. Add a comment. Active Oldest Votes. Improve this answer. One should keep in mind the saying, "It's slow because it's doing a lot. Once the application is running, performance is usually fine with an interpreted language. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Asked 10 years, 4 months ago. Active 6 years, 3 months ago. Viewed 2k times.

It is set up to use the same perl interpreter as gitweb:! Improve this question. Add a comment. Active Oldest Votes. Improve this answer. You can use any directory for TMP, obviously.

Just add this line in httpd. Leanid Leanid 1. Sign up or log in Sign up using Google. Because the HTTP protocol is stateless, simple CGI scripts have no memory of previous requests nor any notion of a continuous user session that spans multiple requests.

Built-in session management is the big possibly the biggest selling point of application servers. However, I would take issue with anyone who considers the lack of session management to be a fatal flaw in CGI. Most scripts don't need the overhead or complexity of a full-blown session-management system, and can make do with a few simple tricks for maintaining state.

For those scripts that need sophisticated session-management systems, such as applications that are physically spread over redundant servers, there's a number of good session-management packages written for various languages and platforms. One measure of a protocol's health is its rate of evolution. Readers may be surprised to hear that the CGI "standard" isn't really a standard at all. The current protocol is a "common practice" adopted from a terse description of CGI version 1. However this effort lost momentum.

This draft is now available for comment by the community and may go through several revisions before it comes up for review by the IETF see " Online ".

This represents an important milestone in the CGI protocol, because for the first time there is an unambiguous standards document to which server vendors and script writers can adhere. In fact, I found a few minor surprises myself while reading through the draft, because there were some places where my interpretation of "common practice" diverges from the draft's.

Without a formal specification, such divergences of interpretation would go unnoticed. Disentangling Scheme and Protocol.

It sounds crazy, but there's no reliable way for a CGI script to reconstruct its own URL for use in self-referencing scripts.

Usually these are the same, but there are some cases in which they're not. The most important example occurs when secure sockets layer SSL is in use. The scheme is "https" but the protocol is still HTTP. Display mode Display replies flat, with oldest first Display replies flat, with newest first Display replies in threaded form Display replies in nested form. This discussion has been locked so you can no longer reply to it.

Average of ratings: -. Thanks for help, we find the problem: On Moodle, aministration site, in manage filters options the "glossary auto-linking" function was on, and every page load, Moodle send out lot of SQL query. After i turn off glossary auto linking, the Moodle page loading is 10 times faster.



0コメント

  • 1000 / 1000