Performance Difference between a statically loaded xform or one generated via servlet/jsp

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Performance Difference between a statically loaded xform or one generated via servlet/jsp

npujol73
Hi,

 I was wondering if anyone could give me some insight on this

 Is it correct to assume that an xform that would loaded directly via
a static url may behave faster as Orbeon is able to cache it once and
for all? Conversely a servlet/jsp generated xforms would not be cached
and would have to regenerated/reprocessed by Orbeon on every request
to the servlet/jsp that generates it ? Are there things that can
configured at the orbeon cache level or in my jsp/servlet ? How
concerned should I be about this potential difference?

any insights would be great. Thanks


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Performance Difference between a statically loaded xform or one generated via servlet/jsp

Alessandro  Vernet
Administrator
Nicolas,

On Thu, Nov 12, 2009 at 11:43 PM, Nicolas Pujol
<[hidden email]> wrote:
>  I was wondering if anyone could give me some insight on this
>
>  Is it correct to assume that an xform that would loaded directly via
> a static url may behave faster as Orbeon is able to cache it once and
> for all? Conversely a servlet/jsp generated xforms would not be cached
> and would have to regenerated/reprocessed by Orbeon on every request
> to the servlet/jsp that generates it ? Are there things that can
> configured at the orbeon cache level or in my jsp/servlet ? How
> concerned should I be about this potential difference?

When you generate the form from a JSP/servlet, Orbeon Forms does the
caching based on a hash of the data you generate. So if you generate
*exactly* the same form, then caching will (or may) happen. You should
just be careful not to do things like dynamically generate values in
an instance, as this will break caching (instead, call a service on
xforms-model-construct-done to load the initial data).

Alex
--
Orbeon Forms - Web forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Performance Difference between a statically loaded xform or one generated via servlet/jsp

npujol73
So in my situation, i am using the jsp to exclusively to generate the  
path to my submissions, instance src and xi: includes ( i am in a  
separate deployment) . Will orbeon be able to cache my jsp generated  
xforms?

On another note, jsp tags are not xml friendly and it makes it painful  
to edit the xform once they are in there. Do u have suggestions to  
work around this problem?

While I am at it - i have not been able to configure my xml editor  
(oxygen) to properly validate my xforms xml. I remember seeing a w3c  
proposal some yeard back. Is there indeed a schema i can use to  
validate my orbeon xforms?

thanks


On Nov 13, 2009, at 6:28 PM, Alessandro Vernet <[hidden email]>  
wrote:

> Nicolas,
>
> On Thu, Nov 12, 2009 at 11:43 PM, Nicolas Pujol
> <[hidden email]> wrote:
>>  I was wondering if anyone could give me some insight on this
>>
>>  Is it correct to assume that an xform that would loaded directly via
>> a static url may behave faster as Orbeon is able to cache it once and
>> for all? Conversely a servlet/jsp generated xforms would not be  
>> cached
>> and would have to regenerated/reprocessed by Orbeon on every request
>> to the servlet/jsp that generates it ? Are there things that can
>> configured at the orbeon cache level or in my jsp/servlet ? How
>> concerned should I be about this potential difference?
>
> When you generate the form from a JSP/servlet, Orbeon Forms does the
> caching based on a hash of the data you generate. So if you generate
> *exactly* the same form, then caching will (or may) happen. You should
> just be careful not to do things like dynamically generate values in
> an instance, as this will break caching (instead, call a service on
> xforms-model-construct-done to load the initial data).
>
> Alex
> --
> Orbeon Forms - Web forms, open-source, for the Enterprise
> Orbeon's Blog: http://www.orbeon.com/blog/
> My Twitter: http://twitter.com/avernet
>
> --
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Performance Difference between a statically loaded xform or one generated via servlet/jsp

Alessandro  Vernet
Administrator
Nicolas,

On Fri, Nov 13, 2009 at 8:03 PM, Nicolas Pujol <[hidden email]> wrote:
> So in my situation, i am using the jsp to exclusively to generate the path
> to my submissions, instance src and xi: includes ( i am in a separate
> deployment) . Will orbeon be able to cache my jsp generated xforms?

If at every request your JSP(s) generate exactly the same output, then
yes. Otherwise, no :).

> On another note, jsp tags are not xml friendly and it makes it painful to
> edit the xform once they are in there. Do u have suggestions to work around
> this problem?

You should be able to keep your JSPs well-formed by using their XML syntax.

> While I am at it - i have not been able to configure my xml editor (oxygen)
> to properly validate my xforms xml. I remember seeing a w3c proposal some
> yeard back. Is there indeed a schema i can use to validate my orbeon xforms?

I am using this schema for XForms, which works out relatively well for
me in IntelliJ:

http://github.com/orbeon/orbeon-forms/blob/master/src/java/org/orbeon/oxf/xml/schemas/xforms-1_0-orbeon.xsd

This our own edited schema, based on an older version of the XForms
schema that was published along the specification.

Alex
--
Orbeon Forms - Web forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Performance Difference between a statically loaded xform or one generated via servlet/jsp

Binesh Gummadi
In reply to this post by Alessandro Vernet
Alex,

We are using the approach that you recommended here. Instances in form definition are empty and we are inserting nodes on xforms-model-construct-done. This approach works well as long as we do not have other actions dependent on xforms-model-construct-done.

For instance, if I add a <xforms:setvalue ev:event="xforms-model-construct-done" .../> it fails to set the value as this is executed before inserting nodes. I checked orbeon logs to confirm that setvalue is being executed before insert. This is purely an issue with order of execution.

On the other hand xxforms:default stopped working after making this change. I believe this is the same issue.

How are folks handling scenarios where you use xforms-model-construct-done to insert nodes into instances and also populate default values?

Thanks
Binesh Gummadi
Reply | Threaded
Open this post in threaded view
|

Re: Re: Performance Difference between a statically loaded xform or one generated via servlet/jsp

Erik Bruchez
Administrator
Binesh,

You could work around this by using xforms-ready instead of
xforms-model-construct-done.

In general we prefer xforms-model-construct-done as the controls are
not existent at that point so you avoid further UI updates, but if
that fails, then xforms-ready can be used.

-Erik

On Fri, Sep 10, 2010 at 7:46 AM, Binesh Gummadi <[hidden email]> wrote:

>
> Alex,
>
> We are using the approach that you recommended here. Instances in form
> definition are empty and we are inserting nodes on
> xforms-model-construct-done. This approach works well as long as we do not
> have other actions dependent on xforms-model-construct-done.
>
> For instance, if I add a <xforms:setvalue
> ev:event="xforms-model-construct-done" .../> it fails to set the value as
> this is executed before inserting nodes. I checked orbeon logs to confirm
> that setvalue is being executed before insert. This is purely an issue with
> order of execution.
>
> On the other hand xxforms:default stopped working after making this change.
> I believe this is the same issue.
>
> How are folks handling scenarios where you use xforms-model-construct-done
> to insert nodes into instances and also populate default values?
>
> Thanks
> Binesh Gummadi
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Performance-Difference-between-a-statically-loaded-xform-or-one-generated-via-servlet-jsp-tp620822p2534560.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> 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