One thing I've been thinking about for improving the performance of different-locals-same-template stuff is to keep the old precompiled template so at least that doesn't need to be redone. Then, when local variables are assigned, if they're different than what we've got, we just need to add in a few lines. I might just make this the behavior for all sorts of different-locals templates, so these issues don't come up.
- Nathan Nick Howell wrote: > Bingo; never mind the last message. I see now that in > Engine#initialize you ensure that a superset is supported. > > Problem with this is that a lot of people (myself included) depend on > locals that have not been sent explicitly remaining undefined. That's > pretty standard behavior with erb and earlier versions of haml, though > I understand if you want to break with this. Another question: what if > someone passes in nil for one of their locals? I guess they'd need a > workaround; a special MyNilClass. Or maybe just pass in false? > > Admittedly, you get better performance with this method, but I'm not > sure it's worth the lack of "niceness." > > Nick > > On May 16, 10:25 pm, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote: > >> Whoops! I should have caught that. I'll fix it as soon as I'm able (I >> just got a new computer, and I have yet to install Ruby or Subversion on >> it - soon, though!). >> >> - Nathan >> >> Nick Howell wrote: >> >>> Thought I'd seen the last of this one[1]. >>> >>> engine.rb: >>> 421 @scope_object.class.instance_eval do >>> 422 include CompiledTemplates >>> 423 end >>> >>> Should be >>> @scope_object.extend(CompiledTemplates) >>> >>> [1]:http://groups.google.com/group/haml/browse_frm/thread/c6a681ae92ae1b1... >>> >>> What're the chances? >>> >>> I'd be careful of ever doing .class.instance_eval. >>> >>> Nick >>> > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Haml" 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/haml?hl=en -~----------~----~----~----~------~----~------~--~---
