<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">Thanks for the help.</div>
<div class="">Yes, I am using "#!/usr/bin/swift”. It is slow for the first time, later I am getting quicker response.</div>
<div class="">I will try using compiled executable as you suggested.</div>
<div class=""><br class="webkit-block-placeholder">
</div>
<div class=""><br class="webkit-block-placeholder">
</div>
<div class=""><br class="Apple-interchange-newline">
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Feb 28, 2017, at 12:49 PM, Jens Alfke <<a href="mailto:jens@mooseyard.com" class="">jens@mooseyard.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On Feb 27, 2017, at 2:45 AM, Rupendra Limbore via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="" style="font-family: Alegreya-Regular; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
I am using swift as a CGI script with Apache server (just to explore).</div>
</div>
</blockquote>
<br class="">
</div>
<div class="">Are you treating Swift like a shell-script, by putting a “#!” at the top of the file? That works, but it’s going to be terribly slow for a CGI script because the source code has to be compiled for every... single… HTTP… request.</div>
<div class=""><br class="">
</div>
<div class="">It would be much more efficient to compile the Swift to an executable file, and then use that file as the CGI. And that will solve your multiple-source-files problem too.</div>
<div class=""><br class="">
</div>
<div class="">—Jens</div>
</div>
</div>
</blockquote>
</div>
`</div>
</body>
</html>