On 20/05/2009, at 12:57 AM, Morgan Morgan <[email protected] > wrote:
> > so.. > > I'm making a scheduler.. i have a table of scheduled and > scheduleable > hours for multiple users which needs to be turned into a view (with > schedule type as there are 4 different types) of 7 days of those > scheduled and scheduleable hours for multiple users.. > > right now i've a loop which iterates over every hour and tests it > against all the returned scheduleable and scheduled hours for those 7 > days... > > it's really slow.. the loop that figures out the schedule type runs > like > 1000 times and just obliterates my processor locally while it's > running. > > anyone have any suggestion of how to speed things up? i've been > thinking about it but can't seem to come to a speedier conclusion. > -- > My suggestion is to drive things from the view requirements. What does your view actually need to output? From there, work backwards to the code required. If you give us morecontect, we can help further. Blog: http://random8.zenunit.com/ Twitter: http://twitter.com/random8r Learn: http://sensei.zenunit.com/ New video up now at http://sensei.zenunit.com/ real fastcgi rails deploy process! Check it out now! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

