Author |
Message
|
EnOne |
Posted: Tue Aug 23, 2005 7:35 am Post subject: Too much time in a while loop |
|
|
 Centurion
Joined: 09 Oct 2002 Posts: 100 Location: Kansas City
|
I have a large message being parsed from a BLOB to an MRM to an XML message. Fixed Lenth BLOB to MRM using Reset Content Descriptior creating an MRM looking Like this
Code: |
<Top>
<Parent>
<Child1/>
<Child2/>
<Child3/>
<Child4/>
<Child5/>
<Child6/>
</Parent>
<Parent>
<Child1/>
<Child2/>
<Child3/>
<Child4/>
<Child5/>
<Child6/>
</Parent>
</Top> |
only there are between 700 and 800 Parents.
when I run though the Parents using referenece variables It takes 6 seconds to make it from start to end even if I do not do anything with the Children
Code: |
DECLARE InputParent REFERENCE TO InputRoot.MRM.Top.Parent;
WHILE LASTMOVE(InputParent) DO
MOVE InputParent NEXTSIBLING;
END WHILE; |
Code: |
SET Environment.Top.Parent[] = InputRoot.MRM.Top.Parent[]; |
both these take 6 seconds.
Does anyone know if I am having a code issue or an environment problem. WBIMB 5.0 CSD 6 |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Aug 23, 2005 7:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Does the speed through the loop change if you put a Trace node between the RCD and the compute node that does the loop?
It may simply be that your message takes some time to parse. The trace ndoe will separate the time for parsing from the time for walking the tree. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
EnOne |
Posted: Tue Aug 23, 2005 8:17 am Post subject: |
|
|
 Centurion
Joined: 09 Oct 2002 Posts: 100 Location: Kansas City
|
It's a simple message and 6 seconds seems like forever. I tried placing a trace node before the compute node and both took around 6-7 seconds. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Aug 23, 2005 8:27 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It is a simple message, but it's a somewhat *large* message.
Also, you don't say if you're using CWF or TDS or data patterns or what - the simpler you can model your data, the faster it will parse.
So you put a trace node in, and told it to trace the entire message (thereby causing a full parse). This took 6-7 seconds. The compute node after that, which just walks the tree, also took 6-7 seconds?
That seems odd. References should be significantly faster than that for a fully parsed tree. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
elvis_gn |
Posted: Tue Aug 23, 2005 9:02 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hey
I think you should first tell us what ur system configuration is  |
|
Back to top |
|
 |
|