ustcweizhou edited a comment on issue #3306: server: reduce execution time 
while listing project if projects have many resource tags
URL: https://github.com/apache/cloudstack/pull/3306#issuecomment-502142160
 
 
   @PaulAngus I think the issue #3375 can be fixed.
   
   in 
https://github.com/apache/cloudstack/blob/master/server/src/main/java/com/cloud/api/query/ViewResponseHelper.java#L201-L211
   if there are multiple records for a project, newProjectResponse will be 
called for the first record, and fillProjectDetails will be called for the 
rest. This is why you see tags multiple timesI think.
   
   with this PR, fillProjectDetails will do nothing, so the tags will be set 
only once.
   ```
       public static ProjectResponse fillProjectDetails(ProjectResponse rsp, 
ProjectJoinVO proj) {
           return s_projectJoinDao.setProjectResponse(rsp, proj);
       }
   ```
   Of course we can remove these methods (fillProjectDetails, 
setProjectResponse)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to