##// END OF EJS Templates
templater: resurrect cache of engine instance...
Yuya Nishihara -
r38458:25658148 default
parent child Browse files
Show More
@@ -872,6 +872,8 b' class templater(object):'
872 872 self.defaults = defaults
873 873 self._resources = resources
874 874 self._loader = loader(cache, aliases)
875 self._proc = engine(self._loader.load, self._filters, self.defaults,
876 self._resources)
875 877 self._minchunk, self._maxchunk = minchunk, maxchunk
876 878
877 879 @classmethod
@@ -923,8 +925,7 b' class templater(object):'
923 925 def generate(self, t, mapping):
924 926 """Return a generator that renders the specified named template and
925 927 yields chunks"""
926 proc = engine(self.load, self._filters, self.defaults, self._resources)
927 stream = proc.process(t, mapping)
928 stream = self._proc.process(t, mapping)
928 929 if self._minchunk:
929 930 stream = util.increasingchunks(stream, min=self._minchunk,
930 931 max=self._maxchunk)
General Comments 0
You need to be logged in to leave comments. Login now