Re: very low performance
Jay Sprenkle <[email protected]> Tue, 26 Jan 2010 12:18:11 -0600
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
> FastCGI is not particularly appropriate for this task. Apache is most > likely much more efficient at the fairly simple task of streaming files via > HTTP, and doesn't incur the overhead that FastCGI does in performing that > task. FastCgi is overkill for serving static images or static pages. It's not for serving dynamic pages or images. The overhead should NOT be 2 seconds per page in any case. I don't know Haskell, but my guess would be that the file read and write is inefficient, or you're just seeing startup lag. There will be always be a lag when the first request is made using fastcgi. The web server must start the haskell program and then pass the request to it. As long as the web server keeps the program in memory all further requests will be much faster. Here's what I'd try: Profile the code or write to logs with timestamps Change the code to return a string instead and see if the string takes 2 seconds. This will tell if it's the image or the setup. On Tue, Jan 26, 2010 at 12:07 PM, Тарасов Евгений <[email protected]> wrote: > Thanks for your answers! > > > How did you write the code to read the file? > > What language did you write it in? You haven't provided enough > information. > > _______________________________________________ FastCGI-developers mailing list FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers