deploying with capistrano - web site responds much faster

Hi,

just out of curiosity: I have a RoR website, and till now I used to deploy it by hand. Now I've deployed it automatically, and after this the web site response is much faster. I don't know if capistrano did something else too, though the speed of how the site runs has increased a lot. there is another thing though: I'm using a shared account on textdrive, and there it's set up with lighttpd. bottom line, you have to setup a proxy in order to see the site at domain.tld instead of domain.tld:portnumber. When the site was running really slow, I didn't have this proxy setup and probably it took a lot to find out the app or something. what's the right explanation?

I also use Textdrive for one of my clients (LookLocally.com). The only things I can think of as to why its faster would be auto setup of memcache. The default install of the software seems to include it AND have it turned on by default. Going through Proxy seems to make use of it.

Do you store your sessions in the file system? When you setup Capistrano you probably deleted all the old sessions which could speed things up a bit.

I store sessions into the database. Richard, can you please detail a little bit about the memcache being turned on? Do you mean memcache into Rails?

No. It seems to be related to apache in this case. Automatic caching is what it looks like. Although it does seem to know if I changed a file…in most cases. Not much I can detail about it since all I did change was just setting up Mongrel to run. Everything else was just stripping out unneeded modules to speed it up.

That being said, most of the speed improvements of late have been due to code reduction and refactoring. The code base I started using was inherited from another group of seriously under experienced developers. I’m no expert myself but this is ridiculous.

If someone can explain the logic in the following statements, please do so (the code was riddled with similar style of code)

arobject.each do |a| count = 1 if count == 1 do something count = 0

else count = 1 end end

As far as session for this site goes, its all file system. It also probably helps that the site gets restarted each night for log cleanup.