[
http://www.stripesframework.org/jira/browse/STS-302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ben Gunter resolved STS-302.
----------------------------
Resolution: Fixed
Both of the issues addressed here are now fixed for 1.5.
> Layout renderer performance improvements & corrections
> ------------------------------------------------------
>
> Key: STS-302
> URL: http://www.stripesframework.org/jira/browse/STS-302
> Project: Stripes
> Issue Type: Improvement
> Components: Tag Library
> Affects Versions: Release 1.4.1
> Reporter: Denis Ivaikin
> Assignee: Ben Gunter
> Fix For: Release 1.5
>
>
> net.sourceforge.stripes.tag.layout.LayoutRenderTag - doEndTag() does the
> following:
> URL target = request.getSession().getServletContext().getResource(this.name);
> This forces servlet container to create the new session if none exists which
> might be not desirable if the page does not uses sessions at all (page
> session="false" directive). It's possible to get the servlet context through
> the getPageContext().getServletContext().
> Another issue is the getResource() performance penalty, this method triggers
> check if the file exists on the local file system, which is quite slow. Since
> there are few layouts in the application, it's possible to use the Map
> between the page name & URL.
> So, I've made a minor patch which allocates the static Map
> private static ConcurrentMap<String, URL> targetMap = new
> ConcurrentHashMap<String, URL>();
> And uses it like this
> if (!targetMap.containsKey(this.name)) targetMap.put(this.name,
> getPageContext().getServletContext().getResource(this.name));
> URL target = targetMap.get(this.name);
> Which actually gives some performance benefit. However, some pages in the
> application might be deleted in runtime, so, this method could give the false
> positive. It could be possible to refresh the map periodically or use some
> kind of listener.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development