Re: [Xsltforms-support] Select1 box: What is the reason for the delay?
Brought to you by:
alain-couthures
From: peter w. <p....@in...> - 2013-03-14 14:06:20
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD><META http-equiv=Content-Type content="text/html; charset=utf-8"><META content="INBOX.COM" name=GENERATOR></HEAD> <BODY> <DIV>Answering my own question ...</DIV> <DIV> </DIV> <DIV><FONT color=#640064> <P>distinct-values(instance('report-transformed')/body/table/tr/td[3]) takes 69ms whereas the original below is over 9 seconds!</P> <P>Peter</P></FONT> </DIV><BR><BR> <BLOCKQUOTE style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"> <DIV class=msgHeaders>-----Original Message-----<BR><B>From:</B> p....@in...<BR><B>Sent:</B> Thu, 14 Mar 2013 05:20:33 -0800<BR><B>To:</B> ala...@ag...<BR><B>Subject:</B> Re: [Xsltforms-support] Select1 box: What is the reason for the delay?<BR><BR></DIV> <DIV class=oldBody> <DIV> <DIV>Alain and other list members</DIV> <DIV> </DIV> <DIV>After examining the profiler I see that the main time is taken with the following:</DIV> <DIV> </DIV> <DIV><FONT face="Courier New">instance('report-transformed')/body/table/tr[not(td[3] = preceding-sibling::tr/td[3]) and not(td[3]='')]</FONT></DIV> <DIV><FONT face="Courier New"></FONT> </DIV> <DIV><FONT face="Courier New">This is my way of populating a second select box with unique values from an xhtml file that is loaded into my form, and I suspect (but don't know) that changing the selected value in my first select box is triggering a refresh of the whole form. Is this the case? Can it be prevented so that it only happens when I make a submission on the changed select box value?</FONT></DIV> <DIV><FONT face="Courier New"></FONT> </DIV> <DIV><FONT face="Courier New">Cheers</FONT></DIV> <DIV><FONT face="Courier New"></FONT> </DIV> <DIV><FONT face="Courier New">Peter</FONT></DIV><BR><BR> <BLOCKQUOTE _style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"> <DIV _class="msgHeaders">-----Original Message-----<BR><B>From:</B> ala...@ag...<BR><B>Sent:</B> Wed, 13 Mar 2013 22:08:11 +0100<BR><B>To:</B> p....@in...<BR><B>Subject:</B> Re: [Xsltforms-support] Select1 box: What is the reason for the delay?<BR><BR></DIV> <DIV _class="oldBody"> <DIV> <DIV _class="moz-cite-prefix">Yes, currently, there is no optimization for // in XSLTForms.<BR><BR>It means that each and every nodes in the subtree are tested.<BR><BR>Using the id() function, when possible, can be very useful too.<BR><BR>-Alain<BR><BR>Le 13/03/2013 22:02, peter winstanley a écrit :<BR></DIV> <BLOCKQUOTE cite=mid:E02...@in... type="cite"> <META name=GENERATOR content=INBOX.COM>Hello Alain<BR><BR>Thanks you for our kind suggestions.... so is // much more computationally intensive than using the full path in an XPath expression?<BR><BR>Regards<BR><BR>Peter<BR> <DIV> </DIV><BR></BLOCKQUOTE><BR></DIV></DIV></BLOCKQUOTE> <HR SIZE=1 noShade _style="clear:both;margin-top:10px;height:1px;"> <DIV _style="font:12px Verdana,sans-serif;color:Black;background:white;padding:3px;line-height:1.3em"><A href="http://www.inbox.com/marineaquarium"><IMG border=0 alt="3D Marine Aquarium Screensaver Preview" align=left src="http://my.inbox.com/img/ftrs/marine.jpg" width=104 hight="90" _style="margin-right:15px"></A> <BR><STRONG><FONT color=#2086c3>Free 3D Marine Aquarium Screensaver</FONT></STRONG><BR><NOBR>Watch dolphins, sharks & orcas on your desktop!</NOBR> <NOBR>Check it out at <A href="http://www.inbox.com/marineaquarium">www.inbox.com/marineaquarium</A></NOBR></DIV></DIV></DIV></BLOCKQUOTE><hr size="1px" noshade style="clear:both;margin-top:10px;height:1px;"> <div style="font:12px Verdana,sans-serif;color:Black;background:white;padding:3px;line-height:1.3em"> <a href="http://www.inbox.com/marineaquarium"><img src="http://my.inbox.com/img/ftrs/marine.jpg" width="104" hight="90" alt="3D Marine Aquarium Screensaver Preview" align="left" border="0" style="margin-right:15px" /></a> <br><strong><font color="2086c3">Free 3D Marine Aquarium Screensaver</font></strong><br> <nobr>Watch dolphins, sharks & orcas on your desktop!</nobr> <nobr>Check it out at <a href="http://www.inbox.com/marineaquarium">www.inbox.com/marineaquarium</a></nobr></div> </BODY> </HTML> |