Commit e2460a8c authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

brain.absolute_url() is slow because it invokes _aq_dynamic() every time

to get brain.REQUEST, so we call request.physicalPathToURL() directly
instead of brain.absolute_url().


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24503 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0c829029
......@@ -2128,7 +2128,11 @@ class ListBoxHTMLRendererLine(ListBoxRendererLine):
else:
try:
url = '%s/view?selection_index=%s&selection_name=%s&ignore_layout:int=%s&reset:int=1' % (
brain.absolute_url(),
# brain.absolute_url() is slow because it invokes
# _aq_dynamic() every time to get brain.REQUEST,
# so we call request.physicalPathToURL() directly
# instead of brain.absolute_url().
request.physicalPathToURL(brain.getPath()),
self.index, selection_name, ignore_layout)
except AttributeError:
pass
......
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