[
https://issues.apache.org/jira/browse/TOMAHAWK-843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12584500#action_12584500
]
Simon Kitching commented on TOMAHAWK-843:
-----------------------------------------
One thing I see from the UIData implementation is that it does keep a reference
to the DataModel in a member of the UIData class. It does not save this in its
saveState method, ie this is effectively a "transient" member - providing the
saveState/restoreState methods are used. They are always used for client-side
state. And they are called by default in at least the most recent myfaces
versions (SERIALIZE_STATE_IN_SESSION=true); see JspStateManagerImpl. But I
think that in some older versions it was not the default. And in that case, a
reference to the DataModel would be held until the UIData component was
garbage-collected, even for a read-only table.
> myfaces not releasing memory gracefully?
> ----------------------------------------
>
> Key: TOMAHAWK-843
> URL: https://issues.apache.org/jira/browse/TOMAHAWK-843
> Project: MyFaces Tomahawk
> Issue Type: Bug
> Affects Versions: 1.1.3
> Environment: tomcat 5.5.12
> Reporter: Dez
>
> Hi,
> I've been using Myfaces implementation of JSF for couple of months and
> just noticed that memory usage is pretty high - > many times I got out of
> memory error. It works fine for simple pages, but when the page is large and
> complex, it doesn't seem to release the memory used by component states.
> Here is the scenario:
> I'm using t:datatable for rendering employees info. Each row corresponds to
> a employee object, the row has 10 columns.
> It works fine in terms of memory footprint and CPU, when the dataset the
> table renders is small, but when the size of the datasets is large(talking
> about 500 or more), I get Out of memory error even though the Managed Bean
> is request-scoped. No pagination being employed(that's the last resort). So
> when the number of user increases, this leads to a serious issues of server
> crash, hang etc.
> On profiling using yourtoolkit, I found that faces context never releases
> the memory used by UI Components and the behaviour is erratic. The GC kicks
> in after certain stage which is not very useful. Even for a table of small
> data rows(20-30), it doesn't seem to release the memory, in fact it
> accumulates the memory.
> So even the pagination doesn't seem to solve the out- of- memory issue as
> the web site will be used by large number of users. FYI, I'm using the
> client STATE_SAVING_METHOD.
> <context-param>
> <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
> <param-value>client</param-value>
> </context-param>
> Has anyone faced similar issues? Is this a bug or known issues of myfaces?
> No one seem to have resolved this issues, I did see similar issues being
> posted in different forums.
> Would appreciate your help in this regard.
> thanks
> Dezmax
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.