I think that I have come across a bug in Orbeon (I am using the nightly build 3.9.0.rc1.201103220245 CE) where anything with an xforms-enabled action within an XBL component get executed repeatedly--about 20 times. I'm not sure what the number is tied to, perhaps the number of XBL components I have loaded in a form, but I can't be sure.
There is a workaround for this: <xforms:action ev:event="xforms-enabled" if="not(instance('has-executed') = 'true')"> actions... <xforms:setvalue ref="instance('has-executed')" value="'true'"/> </xforms:action> In the model for the XBL component is: <xforms:instance id="has-executed"> <has-executed xmlns="">false</has-executed> </xforms:instance> This, as it turns out, might be an enormous performance issue since I have fr:autocompletes and other controls performing hundreds of API lookups on other web services whereas it should only fire off 5-10 queries. Thanks for looking into this, Ethan -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Ethan,
xforms-enabled is fired for each control and variable, and those events bubble. If you have an event handler say in a group, the handler will run once for each control becoming relevant. Could it be what you are hitting? -Erik On Thu, Aug 18, 2011 at 6:54 AM, Ethan Gruber <[hidden email]> wrote: > I think that I have come across a bug in Orbeon (I am using the nightly > build 3.9.0.rc1.201103220245 CE) where anything with an xforms-enabled > action within an XBL component get executed repeatedly--about 20 times. I'm > not sure what the number is tied to, perhaps the number of XBL components I > have loaded in a form, but I can't be sure. > > There is a workaround for this: > > <xforms:action ev:event="xforms-enabled" if="not(instance('has-executed') = > 'true')"> > actions... > <xforms:setvalue ref="instance('has-executed')" value="'true'"/> > </xforms:action> > > In the model for the XBL component is: > > <xforms:instance id="has-executed"> > <has-executed xmlns="">false</has-executed> > </xforms:instance> > > This, as it turns out, might be an enormous performance issue since I have > fr:autocompletes and other controls performing hundreds of API lookups on > other web services whereas it should only fire off 5-10 queries. > > Thanks for looking into this, > Ethan > > > -- > You receive this message as a subscriber of the [hidden email] mailing > list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Erik,
I took a more in depth look into this after running into an issue where Tomcat would just die after a series of many, many warnings. I'm trying to wrap my head around how xforms-ready functions. Suppose I have a repeatable element which is represented by an XBL component <xforms:repeat element="subject"> <xblcomponent:subject/> </xforms:repeat> Each XBL component for subject has its own model for an fr:autocomplete, and I've been using xforms-ready to set the label. Let's suppose my document has 20 subjects. Does this mean there are 400 initializations? Is there a more efficient way to set values in an XBL component when the form loads? Thanks, Ethan On Tue, Aug 23, 2011 at 12:59 AM, Erik Bruchez <[hidden email]> wrote: Ethan, -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Ethan,
Do you mean xforms-enabled? xforms-ready doesn't (shouldn't) fire on models within XBL components. Now yes, if you have 20 repeats, each contains an XBL instance, each with 20 controls, you are going to get 20 x 20 = 400 xforms-enabled. If you do something for each of those (i.e. have event handlers running for all of those), it's going to be pretty bad. But you shouldn't have to, right: you only need 20 initializations. Say your subject component has an inner group. You can make sure a handler placed within it runs only once, and not for all nested controls, this way: <group> <action ev:event="xforms-enabled" ev:target="#observer"> The "#observer" is an Orbeon extension that makes sure that the handler runs only when the event is directly targeted at the observer (here the group). -Erik On Mon, Sep 26, 2011 at 3:57 PM, Ethan Gruber <[hidden email]> wrote: > Hi Erik, > > I took a more in depth look into this after running into an issue where > Tomcat would just die after a series of many, many warnings. I'm trying to > wrap my head around how xforms-ready functions. Suppose I have a repeatable > element which is represented by an XBL component > > <xforms:repeat element="subject"> > <xblcomponent:subject/> > </xforms:repeat> > > Each XBL component for subject has its own model for an fr:autocomplete, and > I've been using xforms-ready to set the label. Let's suppose my document > has 20 subjects. Does this mean there are 400 initializations? Is there a > more efficient way to set values in an XBL component when the form loads? > > Thanks, > Ethan > > On Tue, Aug 23, 2011 at 12:59 AM, Erik Bruchez <[hidden email]> wrote: >> >> Ethan, >> >> xforms-enabled is fired for each control and variable, and those >> events bubble. If you have an event handler say in a group, the >> handler will run once for each control becoming relevant. >> >> Could it be what you are hitting? >> >> -Erik >> >> On Thu, Aug 18, 2011 at 6:54 AM, Ethan Gruber <[hidden email]> wrote: >> > I think that I have come across a bug in Orbeon (I am using the nightly >> > build 3.9.0.rc1.201103220245 CE) where anything with an xforms-enabled >> > action within an XBL component get executed repeatedly--about 20 times. >> > I'm >> > not sure what the number is tied to, perhaps the number of XBL >> > components I >> > have loaded in a form, but I can't be sure. >> > >> > There is a workaround for this: >> > >> > <xforms:action ev:event="xforms-enabled" >> > if="not(instance('has-executed') = >> > 'true')"> >> > actions... >> > <xforms:setvalue ref="instance('has-executed')" value="'true'"/> >> > </xforms:action> >> > >> > In the model for the XBL component is: >> > >> > <xforms:instance id="has-executed"> >> > <has-executed xmlns="">false</has-executed> >> > </xforms:instance> >> > >> > This, as it turns out, might be an enormous performance issue since I >> > have >> > fr:autocompletes and other controls performing hundreds of API lookups >> > on >> > other web services whereas it should only fire off 5-10 queries. >> > >> > Thanks for looking into this, >> > Ethan >> > >> > >> > -- >> > You receive this message as a subscriber of the [hidden email] >> > mailing >> > list. >> > To unsubscribe: mailto:[hidden email] >> > For general help: mailto:[hidden email]?subject=help >> > OW2 mailing lists service home page: http://www.ow2.org/wws >> > >> > >> >> >> -- >> You receive this message as a subscriber of the [hidden email] mailing >> list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws >> > > > > -- > You receive this message as a subscriber of the [hidden email] mailing > list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Yeah, I meant xforms-enabled. Thanks, Erik, this fixed the issue.
Ethan On Mon, Sep 26, 2011 at 11:24 PM, Erik Bruchez <[hidden email]> wrote: Ethan, -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Good to hear! -Erik
On Tue, Sep 27, 2011 at 9:41 AM, Ethan Gruber <[hidden email]> wrote: > Yeah, I meant xforms-enabled. Thanks, Erik, this fixed the issue. > > Ethan > > On Mon, Sep 26, 2011 at 11:24 PM, Erik Bruchez <[hidden email]> wrote: >> >> Ethan, >> >> Do you mean xforms-enabled? xforms-ready doesn't (shouldn't) fire on >> models within XBL components. >> >> Now yes, if you have 20 repeats, each contains an XBL instance, each >> with 20 controls, you are going to get 20 x 20 = 400 xforms-enabled. >> If you do something for each of those (i.e. have event handlers >> running for all of those), it's going to be pretty bad. But you >> shouldn't have to, right: you only need 20 initializations. Say your >> subject component has an inner group. You can make sure a handler >> placed within it runs only once, and not for all nested controls, this >> way: >> >> <group> >> <action ev:event="xforms-enabled" ev:target="#observer"> >> >> The "#observer" is an Orbeon extension that makes sure that the >> handler runs only when the event is directly targeted at the observer >> (here the group). >> >> -Erik >> >> On Mon, Sep 26, 2011 at 3:57 PM, Ethan Gruber <[hidden email]> wrote: >> > Hi Erik, >> > >> > I took a more in depth look into this after running into an issue where >> > Tomcat would just die after a series of many, many warnings. I'm trying >> > to >> > wrap my head around how xforms-ready functions. Suppose I have a >> > repeatable >> > element which is represented by an XBL component >> > >> > <xforms:repeat element="subject"> >> > <xblcomponent:subject/> >> > </xforms:repeat> >> > >> > Each XBL component for subject has its own model for an fr:autocomplete, >> > and >> > I've been using xforms-ready to set the label. Let's suppose my >> > document >> > has 20 subjects. Does this mean there are 400 initializations? Is >> > there a >> > more efficient way to set values in an XBL component when the form >> > loads? >> > >> > Thanks, >> > Ethan >> > >> > On Tue, Aug 23, 2011 at 12:59 AM, Erik Bruchez <[hidden email]> >> > wrote: >> >> >> >> Ethan, >> >> >> >> xforms-enabled is fired for each control and variable, and those >> >> events bubble. If you have an event handler say in a group, the >> >> handler will run once for each control becoming relevant. >> >> >> >> Could it be what you are hitting? >> >> >> >> -Erik >> >> >> >> On Thu, Aug 18, 2011 at 6:54 AM, Ethan Gruber <[hidden email]> >> >> wrote: >> >> > I think that I have come across a bug in Orbeon (I am using the >> >> > nightly >> >> > build 3.9.0.rc1.201103220245 CE) where anything with an >> >> > xforms-enabled >> >> > action within an XBL component get executed repeatedly--about 20 >> >> > times. >> >> > I'm >> >> > not sure what the number is tied to, perhaps the number of XBL >> >> > components I >> >> > have loaded in a form, but I can't be sure. >> >> > >> >> > There is a workaround for this: >> >> > >> >> > <xforms:action ev:event="xforms-enabled" >> >> > if="not(instance('has-executed') = >> >> > 'true')"> >> >> > actions... >> >> > <xforms:setvalue ref="instance('has-executed')" value="'true'"/> >> >> > </xforms:action> >> >> > >> >> > In the model for the XBL component is: >> >> > >> >> > <xforms:instance id="has-executed"> >> >> > <has-executed xmlns="">false</has-executed> >> >> > </xforms:instance> >> >> > >> >> > This, as it turns out, might be an enormous performance issue since I >> >> > have >> >> > fr:autocompletes and other controls performing hundreds of API >> >> > lookups >> >> > on >> >> > other web services whereas it should only fire off 5-10 queries. >> >> > >> >> > Thanks for looking into this, >> >> > Ethan >> >> > >> >> > >> >> > -- >> >> > You receive this message as a subscriber of the [hidden email] >> >> > mailing >> >> > list. >> >> > To unsubscribe: mailto:[hidden email] >> >> > For general help: mailto:[hidden email]?subject=help >> >> > OW2 mailing lists service home page: http://www.ow2.org/wws >> >> > >> >> > >> >> >> >> >> >> -- >> >> You receive this message as a subscriber of the [hidden email] >> >> mailing >> >> list. >> >> To unsubscribe: mailto:[hidden email] >> >> For general help: mailto:[hidden email]?subject=help >> >> OW2 mailing lists service home page: http://www.ow2.org/wws >> >> >> > >> > >> > >> > -- >> > You receive this message as a subscriber of the [hidden email] >> > mailing >> > list. >> > To unsubscribe: mailto:[hidden email] >> > For general help: mailto:[hidden email]?subject=help >> > OW2 mailing lists service home page: http://www.ow2.org/wws >> > >> > >> >> >> -- >> You receive this message as a subscriber of the [hidden email] mailing >> list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws >> > > > > -- > You receive this message as a subscriber of the [hidden email] mailing > list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |