DNG 6.0 : reduce response time for retreving list of requirements from folder.
I am able to get the list of all the requirements in a folder but its taking too much time in retrieval if folder contains more than 150 requirements then response time is around 1 minutes. i am wondering what would happen when folder contains 5000 even more requirements.
After pulling out all these requirements , i have to show them on a third party tool in a table format but i don't want user to wait for more a minute after selecting a folder to pull out the requirements from. Is there any way to reduce this response time. I have posted the Query i am using to get the list of requirements from a folder. ==> Second query : what would be the page size, just like now i have given 1000 but what if my folder contains more than that? and how would it impact if i give page size 10 thousand and my folder contains only 5-10 requirements ? queryParams.setPrefix("nav=<http://com.ibm.rdm/navigation#>,rdf=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>"); queryParams.setWhere("nav:parent=<"+ folderUri +">, rdf:type=<http://open-services.net/ns/rm#Requirement>"); OslcQuery query =new OslcQuery(client, queryCapability, 1000, queryParams); OslcQueryResult result = query.submit(); |
One answer
If there are more artifacts than the given page size, there should be a "next page" link in the response. Follow the link to get the next page, and so on, till you get to the last page. If there are fewer artifacts than the given page size, all the artifacts are returned in a single response, and nothing else significant will happen.
You need to be cautious about the page size as it translates to the amount of required memory. If you set the page size too large and there are indeed that many artifacts returned, you may face memory issues such "out of memory". Comments Thanks!!! Donald,
Donald Nong
commented Oct 14 '15, 1:22 a.m.
If you're using Lyo OSLC4j, check out the OslcQueryResult class. It has a function getNextPageUrl() that you can use to do pagination. Do not set too large a page size as it will cripple your server.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.