Forum: Ruby on Rails Fragment cache hit is super slow every two times

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fernando P. (Guest)
on 2008-11-25 23:33
Hi,

I have a piece of html that I fragment cache. For a very strange reason
every two times I request the page, rendering the fragment cache takes a
lot of time.

Example:

1) I request index page, rendering takes 300ms
2) I request again index page, rendering takes 1300ms
3) I request again index page, rendering takes 300ms
4) and so on


Where could that come from???
Fernando P. (Guest)
on 2008-11-25 23:58
Fernando P. wrote:
> Hi,
>
> I have a piece of html that I fragment cache. For a very strange reason
> every two times I request the page, rendering the fragment cache takes a
> lot of time.
>
> Example:
>
> 1) I request index page, rendering takes 300ms
> 2) I request again index page, rendering takes 1300ms
> 3) I request again index page, rendering takes 300ms
> 4) and so on
>
>
> Where could that come from???

I try to do some profiling with script/performance/request, but it seems
broken, because when it has finished making requests, it never renders
the results. In Rails 2.1.1 it worked fine though.

Has anyone encountered this problem?
Fernando P. (Guest)
on 2008-11-26 00:12
> I try to do some profiling with script/performance/request, but it seems
> broken, because when it has finished making requests, it never renders
> the results. In Rails 2.1.1 it worked fine though.
>
> Has anyone encountered this problem?

I had forgotten to use production environment for the profiling, now it
renders the results.
This topic is locked and can not be replied to.