Why is my first RoR app on Dreamhost so slow?

I have my first RoR app deployed on Dreamhost and using Passenger. One post on Dreamhost wiki about slow response mentioned changing the RewriteRules line in the public / .htaccess file to use FastCGI. But I'm guessing it won't have any effect if I'm using a Passenger, right?

I have looked through the logs and compared them to my local logs and it looks like Dreamhost has a wider range. Some responses are comparable to fast local responses, others may take a few seconds.

I am using front end Flex with HTTPServices for the backend rails and I think I also need to add a log about my services to see how much network latency I am getting and try to isolate where the latency is.

I should also add that there is probably a lot of room for improvement in the area of ​​active boot associations. I think I've done this a bit earlier, but haven't done it thoroughly across all associations. I have local logs set by default where I can see all requests and there are a lot of them.

+2


source to share


2 answers


You must be in development mode. Try running in Production mode to see it is still slow.

The post below might help:



Ruby On Rails is slow ...?

+2


source


A new relic is a Rails performance monitoring application. I haven't personally used it, but I've heard their name a lot and it looks like they have a free version for you to try. From my experience with profiling other applications, such a tool is worth using because the slow parts of your application are often in areas where you would not expect.



0


source







All Articles