Loading ...
Sorry, an error occurred while loading the content.

4704Re: [Cheetahtemplate-discuss] [PATCH] Remove unnecessary dir()/set() calls in Template.__init__()

Expand Messages
  • tyler@monkeypox.org
    Oct 13, 2009
    • 0 Attachment
      On Tue, 13 Oct 2009, Aahz wrote:

      > On Mon, Oct 12, 2009, R. Tyler Ballance wrote:
      > >
      > > When running cheetah.Tests.Performance.DynamicMethodCompilationTest
      > > with 100000 iterations set, Template.__init__() is the most performance
      > > sensitive call.
      >
      > This seems like a safe change. I would even go a step further in
      > performance and reducing namespace pollution:
      >
      > Template.Reserved_SearchList = set(dir(Template))
      >
      > You can then go back to using self.Reserved_SearchList, which should be
      > faster than a global lookup. (I'm only mentioning this because you're
      > using the lookup in a loop.)

      Good point; thanks for the suggestion. Updated in rtyler/next
      (http://github.com/rtyler/cheetah/tree/next)


      Cheers,
      -R. Tyler Ballance
    • Show all 4 messages in this topic