id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 183,py:match template matching is inefficient,anonymous,cmlenz,"I noticed that most py:match's are fairly simple: But when we got to match, we try to match every single event against a complex path, basically calling each path's _test() method over and over. Instead I borrowed a play from web browsers: index common paths (i.e. like CSS selectors) and then only match against them. So I keep a dictionary mapping nodenames->py:match templates. Rather than calling _test() against every single py:match, I only call _test() against the paths that matter. I'm attaching a patch to this bug, which is not quite the final patch. ",enhancement,new,major,,Template processing,0.4.4,,,