My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 205: out of memory was caused by mass objects
  Back to list
Status:  Invalid
Owner:  ----
Closed:  Jul 2009


 
Reported by magicbil...@gmail.com, Jul 11, 2009
What steps will reproduce the problem?
1. fetch back about 20000 lines' record from db as a list
2. set to jmesa 
3. after 2mins , an Exception -- out of memory showed on page 

What is the expected output? What do you see instead?
my page limit is 10000, so i expected a 10000 lines' list finally to be 
rendered on the page.

What version of the product are you using? On what operating system?
the lastest one.


Please provide any additional information below.
when the limit was 5000, the rendering process was still too slow to wait.
any suggestion ?

Jul 11, 2009
Project Member #1 jeff.johnston.mn@gmail.com
You will want to use the Limit to efficiently just pull one page of data at a time.

https://code.google.com/p/jmesa/wiki/LimitTutorial
Jul 13, 2009
Project Member #2 jeff.johnston.mn@gmail.com
(No comment was entered for this change.)
Status: Invalid
Jul 14, 2009
#3 magicbil...@gmail.com
hi, Jeff 
I know what does the Limit for. 
but the project , I am handling with, gets some bizarre requirement, 
and no-pagination is one of them.
so here efficiency issue goes again. 
actually , I am using limit mode all the time, and trying to find a suitable page size 
for the project.
but when the page size gets over 500, the rendering speed drops sharply.
and a page like that big is just a normal page in the system.
my point is , is there any trick to improve rendering efficiency ?
Jul 14, 2009
Project Member #4 jeff.johnston.mn@gmail.com
Ok, I see what you are doing now. However, I assume the speed issue is not caused by
JMesa? I assume the created html is pretty fast but the rendering is slow? You could
test that out by doing a view->source on that page and copy and paste the JMesa
output directly in your page. That way you would know if it is JMesa that is slow, or
the browser rendering.

Also let me know if you are using the tag library or the API directly. It could be
the JSP tag having a hard time loading so much.
Status: Accepted
Jul 14, 2009
#5 magicbil...@gmail.com
That is absolutky right! the slow part is jsp rendering.
Getting limit object loaded is sth out of jmesa control, which is completed by my
query engine. so fulling limit is not an issue.
----------------------------
my problem is that I put jmesa's jsp tag into operation too ambitiously, actually
most query needs in my project are quite easy , so I could design a rendering
template jsp with jmesa tag to handle each of them without rewrite a bit of html code :) 
u may take a look at the template code at below.
so far my only solution of this issue is to chop down limit's page size, 
but I still will do some test to discover the jsp template's downside.



<jmesa:struts2TableFacade id="${viewId}" items='${viewInfo.listData}'
				stateAttr="restore" var="bean" limit="${viewInfo.extraInfo.limit}"
				toolbar="aicu.application.mps.voice.widget.jmesa.FullPaginationToolbar">
				<jmesa:htmlTable caption="${captionName}"
					width="100%">
					<jmesa:htmlRow filterable="false">

						<s:if test="#attr.__sitemesh__page.properties.radiobox!=null">
							<jmesa:htmlColumn
								property="${attr.__sitemesh__page.properties.radiobox}1"
								title="单选" width="30px" style="">
								<input type="radio" name="${viewId}rid"
									value='${bean[attr.__sitemesh__page.properties.radiobox]}' />
							</jmesa:htmlColumn>
						</s:if>

						<s:if test="#attr.__sitemesh__page.properties.checkbox!=null">
							<jmesa:htmlColumn
								property="${attr.__sitemesh__page.properties.checkbox}1"
								title="多选" width="30px">
								<input type="checkbox" name="${viewId}cid"
									value='${bean[attr.__sitemesh__page.properties.checkbox]}' />
							</jmesa:htmlColumn>
						</s:if>
						
						<c:forEach var="col" items="${viewInfo.viewMetadata.columns}">
						
							<s:if test="viewInfo.viewMetadata.i18n == true">
								<s:set var="columnName" value="getText(#attr.col.name)"/>				
							</s:if>
							<s:else>
								<s:set var="columnName" value="#attr.col.name"/>							
							</s:else>
							
							<c:choose>							
								<c:when test="${col.convert!='' && col.convert!=null}">								
									<jmesa:htmlColumn property="${col.code}"
										pattern="${col.format}" title='${columnName}'>							
							
											<s:if
test="#attr.menuMaps.messages[#attr.col.convert][#attr.bean[#attr.col.code]]!=null">
												<s:property
value="#attr.menuMaps.messages[#attr.col.convert][#attr.bean[#attr.col.code]]" />
											</s:if>
											<s:else>
												${col.convertDefValue}
											</s:else>
									</jmesa:htmlColumn>
								</c:when>
								<c:otherwise>
									<jmesa:htmlColumn property="${col.code}" title='${columnName}'>
										<c:choose>
											<c:when test="${col.format=='date'}">
												<fmt:formatDate value="${bean[col.code]}" type="both"
													pattern="yyyy-MM-dd" />
											</c:when>
											<c:when test="${col.format=='datetime'}">
												<fmt:formatDate value="${bean[col.code]}" type="both"
													pattern="yyyy-MM-dd hh:mm:ss" />
											</c:when>
											<c:when test="${col.format=='cnmoney'}">
												<fmt:formatNumber value="${bean[col.code]}" type="number"
													pattern="¥#,#00.00" />
											</c:when>
											<c:when test="${col.format=='usmoney'}">
												<fmt:formatNumber value="${bean[col.code]}" type="number"
													pattern="$#,#00.00" />
											</c:when>
											<c:when test="${col.format=='plain'}">
											${bean[col.code]}
									</c:when>
										</c:choose>
									</jmesa:htmlColumn>
								</c:otherwise>
							</c:choose>
						</c:forEach>
						

					</jmesa:htmlRow>

				</jmesa:htmlTable>
			</jmesa:struts2TableFacade>




Jul 16, 2009
Project Member #6 jeff.johnston.mn@gmail.com
(No comment was entered for this change.)
Status: Invalid

Powered by Google Project Hosting