hhuijser/liferay-portal — pull request #1839 by daledotshan (2014-04-17 14:44:52+00:00)
Title: Lps 46006

This performance issue caused by LPS-45564, After talked with ShuYang, he gave following suggestion:
Don't serialize portletRequestModel to xml, then parse it again in the insertRequestVariables(), that is totally a waste.

These 2 lines are the troubled ones.

1) template.put("request", insertRequestVariables(requestElement));
2) template.put("xmlRequest", requestElement.asXML());

For 1), you can generate the map directly from portletRequestModel, no need to do it via xml.

For 2), Ray told me only XSL type really needs xmlRequest, add back the if check, unless it is XSL type, don't populate it.

I followed above suggestions to fix this issue.