getNodeValue is verry slow (10 seconds)
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2007
07:15 AM
06-13-2007
07:15 AM
getNodeValue is verry slow (10 seconds)
When i ask a value from a node it takes 10 seconds before i got an answer.
I have a large response and i use the follow syntax.
JiraKey = holder.getNodeValue(//multiRef[" + Counter + "]/key)
How can i speed up this syntax?
because i use this syntax in a loop and it taker 1:30 hours to get 500 nodeValues from a response.
I use a jira filter that gave me 500 Jira Issues. 500 Jira issues is for what we are doing normal. The most filters that we user give a result about 1000 jira issues.
I have a large response and i use the follow syntax.
JiraKey = holder.getNodeValue(//multiRef[" + Counter + "]/key)
How can i speed up this syntax?
because i use this syntax in a loop and it taker 1:30 hours to get 500 nodeValues from a response.
I use a jira filter that gave me 500 Jira Issues. 500 Jira issues is for what we are doing normal. The most filters that we user give a result about 1000 jira issues.
4 REPLIES 4
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2007
10:12 AM
06-13-2007
10:12 AM
Hi!
hmm.. can you show the entire script?
regards,
/Ole
eviware.com
hmm.. can you show the entire script?
regards,
/Ole
eviware.com
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2007
10:34 AM
06-13-2007
10:34 AM
import java.util.*
def ArrayList TotJiraIssue = new ArrayList();
def ArrayList Items = new ArrayList();
def ArrayList IssueIDs = new ArrayList();
def ArrayList IssueKeys = new ArrayList();
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( "Ophalen Issue mbv FilterID#response" )
TotJiraIssue = holder.getNodeValues( "//getIssuesFromFilterReturn")
Items = holder.getNodeValues( "//multiRef")
Teller = 1
IssueTeller = 0
log.info("Aantal Issue ophalen : " + TotJiraIssue.size -1)
while (Teller <= Items.size)
{
IssueKey = holder.getNodeValue("//multiRef[" + Teller + "]/key")
if (IssueKey != null)
{
IssueID = holder.getNodeValue("//multiRef[" + Teller + "]/id")
IssueIDs.add(IssueID);
IssueKeys.add(IssueKey);
IssueTeller++
log.info("Aantal valide issues gevonden : " + IssueTeller)
}
Teller++;
if (IssueTeller == (TotJiraIssue.size)-1)
break
}
context.IssueTeller = 0;
context.IssueIDs = IssueIDs;
context.IssueKeys = IssueKeys;
def ArrayList TotJiraIssue = new ArrayList();
def ArrayList Items = new ArrayList();
def ArrayList IssueIDs = new ArrayList();
def ArrayList IssueKeys = new ArrayList();
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( "Ophalen Issue mbv FilterID#response" )
TotJiraIssue = holder.getNodeValues( "//getIssuesFromFilterReturn")
Items = holder.getNodeValues( "//multiRef")
Teller = 1
IssueTeller = 0
log.info("Aantal Issue ophalen : " + TotJiraIssue.size -1)
while (Teller <= Items.size)
{
IssueKey = holder.getNodeValue("//multiRef[" + Teller + "]/key")
if (IssueKey != null)
{
IssueID = holder.getNodeValue("//multiRef[" + Teller + "]/id")
IssueIDs.add(IssueID);
IssueKeys.add(IssueKey);
IssueTeller++
log.info("Aantal valide issues gevonden : " + IssueTeller)
}
Teller++;
if (IssueTeller == (TotJiraIssue.size)-1)
break
}
context.IssueTeller = 0;
context.IssueIDs = IssueIDs;
context.IssueKeys = IssueKeys;
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2007
11:15 AM
06-13-2007
11:15 AM
Hi!
thanks.. performing a //XXX selection will take time on a large document since all nodes will have to be searched each time. Maybe you could "narrow the selection" by specifying all parent elements? ie
/soap:Envelope/soap:Body/xxx/yyy/zzz/multiRef
(or whatever prefix you soap envelope has)..
If that doesn't help significantly, please mail me a sample response you are selecting from so I can try to optimize this locally.. (ole@eviware.com)
regards,
/Ole
eviware.com
thanks.. performing a //XXX selection will take time on a large document since all nodes will have to be searched each time. Maybe you could "narrow the selection" by specifying all parent elements? ie
/soap:Envelope/soap:Body/xxx/yyy/zzz/multiRef
(or whatever prefix you soap envelope has)..
If that doesn't help significantly, please mail me a sample response you are selecting from so I can try to optimize this locally.. (ole@eviware.com)
regards,
/Ole
eviware.com
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2007
12:22 PM
06-16-2007
12:22 PM
That did not solf the problem.
Ik can only speed up, when i write the response to a file an than, walk thru
the file. Monday i wil mail you the export of the respnse.
greetings
Ik can only speed up, when i write the response to a file an than, walk thru
the file. Monday i wil mail you the export of the respnse.
greetings
