Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Performance issue(Loading the page)  RSS feed

 
Srinivas Sundar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I Have created a Layout like below in one of my jsp

prjectPidCostCentres Pojo is dependented in projectRegionInfo

Here at first the data related to projectRegionInfo is coming from actionclass (runs query and stores the data into request.object)

<layout:select key="head.projectName" property="proId">
<layoutption value=""/>
<layoutptions collection="projectRegionInfo" property="proId" labelProperty="regionCode" sourceOf="ccId"/>
</layout:select>

<layout:select key="head.costCentre" property="ccId">
<layoutptionsDependent collection="projectPidCostCentres" property="ccId" dependsFrom="proId" labelProperty="costCentreCode"/>
</layout:select>

My doubt is when the page is loading the records related to projectRegionInfo is laoding quickly in respective combo boxes but when it is try to bring the projectPidCostCentres data(having costcentres for apeticular proId) there are lot�s of HQL queries are running for each proId.

Note:V_PROJECT,V_PROJECT_COST_CENTRE are Views

E.g:
Hibernate: select projectpid0_.PRO_PRO_ID as PRO3___, projectpid0_.CC_CC_ID as CC1___, projectpid0_.CC_CC_ID as CC1_0_, projectpid0_.COST_CENTRE_CODE as COST2_38_0_, projectpid0_.PRO_PRO_ID as PRO3_38_0_ from V_PROJECT_COSTCENTRE projectpid0_ where projectpid0_.PRO_PRO_ID=?

Hibernate: select projectpid0_.PRO_PRO_ID as PRO3___, projectpid0_.CC_CC_ID as CC1___, projectpid0_.CC_CC_ID as CC1_0_, projectpid0_.COST_CENTRE_CODE as COST2_38_0_, projectpid0_.PRO_PRO_ID as PRO3_38_0_ from V_PROJECT_COSTCENTRE projectpid0_ where projectpid0_.PRO_PRO_ID=?

:
:
:
Etc 498 Lines nearly

How can I reduce this repeated query when the page is loading(without refreshing) Please suggest me any logic on this soon. It is a performance issue(I can�t use Ajax)

Regards
Srini
_________________
Cnu
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Srinivas Sundar:
...
How can I reduce this repeated query when the page is loading(without refreshing) Please suggest me any logic on this soon. It is a performance issue(I can�t use Ajax)


I'm not sure I understand the question.
Are you saying that you make the same query more than once when building the page and want to know how you can re-use the values rather than have to read them from the database each time?

Or...

Are you asking how you can repeate the query and update the page with the more recent data without reloading the page?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!