[jifty-devel] A slow pony and suboptimal loops

Agent Zhang agentzh at gmail.com
Mon Dec 18 00:52:45 EST 2006

On 12/18/06, Jesse Vincent <jesse at bestpractical.com> wrote:
> Is it that available_values isn't being cached? If so, would precaching
> it help?

Okay, now I'd request caching the available_values sub (via an
option?) since Benchmark::Timer has produced the following report:

1 trial of total (20.610s total)
75 trials of  available_values  (13.864s total), 184.856ms/trial
75 trials of  loop  (2.126ms total), 28us/trial

Calls of avalable_values are very expensive operations which take
67.3% of the total time. So it has nothing to do with the loop itself.

I think caching is a very promising way to speed up things
dramatically in this situation.


More information about the jifty-devel mailing list