alibaba82
16 years agoSuper Contributor
slow for loop - need advice
Hello,
I have a for loop that looks like this
for(int i = 1; i <= CPS_counter; i++)
{
CPS_sourceId = CPSholder.getNodeValue("//ns1:GetServiceDetailsResponse[1]/ns1:GetServiceDetailsResult[1]/ns1:ChannelLineup[1]/ns1:Channels[1]/ns1:ListingsChannel[$i]/@SourceId");
}
I notice that this loop runs fairly fast when the GetServiceDetailsResponse has relatively few items (20-30). However sometimes i get 400+ channels and the loop becomes very slow. Any ideas on a better solution.
Thanks
Ali
I have a for loop that looks like this
for(int i = 1; i <= CPS_counter; i++)
{
CPS_sourceId = CPSholder.getNodeValue("//ns1:GetServiceDetailsResponse[1]/ns1:GetServiceDetailsResult[1]/ns1:ChannelLineup[1]/ns1:Channels[1]/ns1:ListingsChannel[$i]/@SourceId");
}
I notice that this loop runs fairly fast when the GetServiceDetailsResponse has relatively few items (20-30). However sometimes i get 400+ channels and the loop becomes very slow. Any ideas on a better solution.
Thanks
Ali