Retrieving available values from Simple List with API

Hello everyone,

i’m currently retrieving available values from a simple list using this code below

<br />IAgileSession session = ... //created standard with url, usr, pass<br />IAdminList adminList = session.getAdminInstance().getListLibrary().getAdminList(listName);<br />IAgileList list = adminListByName.getValues();<br /> Iterator&lt;IAgileList&gt; iterator = list.getChildNodes().iterator();<br /> Collection&lt;Sting&gt; result = new ArrayList&lt;&gt;();<br /> while (iterator.hasNext()) {<br /> IAgileList iAgileList = (IAgileList) iterator.next();<br />result.add(iAgileList.getValue());<br /> }<br /> return result;<br />

it works fine majority of the time, except when the list is quite big (aroung 2000 elements and more).
What it causes is a fixed increase of the CPU usage on the server where a custom application runs, even though the call to such method ends correctly.
The only way to “clear” CPU usage is restart the application.

Is there any other way to obtain such values or any workaround to work with big lists? Thank you in advance

Add Comment
1 Answer(s)

sorry cannot edit 1st post, reposting just code

IAgileSession session = … //created standard with url, usr, pass
IAdminList adminList = session.getAdminInstance().getListLibrary().getAdminList(listName);
IAgileList list = adminListByName.getValues();
Iterator<IAgileList>; iterator = list.getChildNodes().iterator();
Collection<Sting> result = new ArrayList<>();
while (iterator.hasNext()) {
       IAgileList iAgileList = (IAgileList) iterator.next();result.add(iAgileList.getValue());
}
return result;

Agile User Answered on July 19, 2018.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.