Commit f2bc42e3 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

more perforance improvement on OOoTemplate by skipping convertToBaseFormat call.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40495 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0b4ab55d
...@@ -591,9 +591,10 @@ class OOoTemplate(ZopePageTemplate): ...@@ -591,9 +591,10 @@ class OOoTemplate(ZopePageTemplate):
format = opts.get('format', request.get('format', None)) format = opts.get('format', request.get('format', None))
if format: if format:
# Performance improvement: # Performance improvement:
# Call convertToBaseFormat only if user # We already have OOo format data, so we do not need to call
# ask a particular output format # convertToBaseFormat(), but just copy it into base_data property.
tmp_ooo.convertToBaseFormat() tmp_ooo.setBaseData(ooo)
tmp_ooo.setBaseContentType(self.content_type)
if request is not None and not batch_mode: if request is not None and not batch_mode:
return tmp_ooo.index_html(REQUEST=request, return tmp_ooo.index_html(REQUEST=request,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment