Re: performance issues

"Ramy Khalil" <[email protected]> Wed, 20 Dec 2006 14:09:31 +0200
Newsgroups gmane.comp.java.enhydra.shark
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1166616617-5041-109
Content-Type: multipart/alternative; 
	boundary="----=_Part_16079_7043554.1166616571457"

------=_Part_16079_7043554.1166616571457
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi
yes i switched off the Security API and the time stamps i sent is with
Security API swithched off.

also i want to ask when their will be Shark2.0 release not beta because i
can't use a beta versions.

Also i need to know is their any differences in Shark2.0-beta7 from code
handling perspective.

At last i need to know how to handle enumeration attribute type from a code
perspective.

and thanks for your cooperation

Greetings,
Ramy.


On 12/20/06, Sasa Bojanic <[email protected]> wrote:
>
> Hi,
>
> did you try to switch-off Security API? It should also improve the
> performance with shark1.1.
>
> Just for your information, the Shark2.0-beta7 version is coming with
> SwingAdmin application + WEB Admin application + some other useful
> client utilities...
>
> Greetings,
> Sasa.
>
> Ramy Khalil wrote:
> > Dear Sasa Bojanic
> >       First i would like to thank u for your fast response.
> > i am using shark 1.1 as you assumed because simply i can't use a beta
> > version (company policy).
> > i changed my code to use SharkTransaction and it really improved the
> > performance.i cerated 25 assignments and i got that result:
> > Assignment no 0 lasted: 94ms
> > Assignment no 1 lasted: 78ms
> > Assignment no 2 lasted: 110ms
> > Assignment no 3 lasted: 94ms
> > Assignment no 4 lasted: 94ms
> > Assignment no 5 lasted: 63ms
> > Assignment no 6 lasted: 94ms
> > Assignment no 7 lasted: 94ms
> > Assignment no 8 lasted: 93ms
> > Assignment no 9 lasted: 94ms
> > Assignment no 10 lasted: 79ms
> > Assignment no 11 lasted: 78ms
> > Assignment no 12 lasted: 125ms
> > Assignment no 13 lasted: 110ms
> > Assignment no 14 lasted: 78ms
> > Assignment no 15 lasted: 94ms
> > Assignment no 16 lasted: 110ms
> > Assignment no 17 lasted: 94ms
> > Assignment no 18 lasted: 78ms
> > Assignment no 19 lasted: 78ms
> > Assignment no 20 lasted: 94ms
> > Assignment no 21 lasted: 63ms
> > Assignment no 22 lasted: 110ms
> > Assignment no 23 lasted: 266ms
> > Assignment no 24 lasted: 172ms
> > time taken: 2537 for total
> > with shark1.1
> >
> > which is an improvement but still not the desired performance.
> >
> > i know that you will say use Shark 2.0.7 beta but as i said i can't use
> a
> > beta version according to my company policy also i downloaded shark
> > 2.0.5beta but i does not have the swing admin interface and the batch
> > file (
> > runsa.bat).
> >
> > On 12/20/06, Sasa Bojanic <[email protected]> wrote:
> >>
> >> Hi,
> >>
> >> as I said, these are the tests with the latest 2.0-beta7 shark version
> >>
> >> Sasa.
> >>
> >> Thomas Buffagni wrote:
> >> > Hi Sasa Bojanic,
> >> > I'm curious to know what is the execution time of the same code below
> >> with the
> >> > latest version of shark...Does anybody have made some tests  ? -
> >> Thomas.
> >> >
> >> > Sasa Bojanic ha scritto:
> >> > > Hi,
> >> > >
> >> > > I made some tests on Shark2.0-beta7 using MySQL database.
> >> > >
> >> > > Here is the code snippet:
> >> > >
> >> > >         long t1, t2, t3;
> >> > >         t1 = System.currentTimeMillis();
> >> > >
> >> > >         ut.begin();
> >> > >         WfAssignment[] ass = sc.getResourceObject
> >> ().get_sequence_work_item(0);
> >> > >         ut.commit();
> >> > >
> >> > >         t2 = System.currentTimeMillis();
> >> > >
> >> > >         for (int i = 0; i < ass.length; i++) {
> >> > >            long ti = System.currentTimeMillis();
> >> > >            ut.begin();
> >> > >            WfAssignment as = ass[i];
> >> > >            WfActivity act = as.activity();
> >> > >            act.key();
> >> > >            act.name();
> >> > >            WfProcess proc = act.container();
> >> > >            proc.name();
> >> > >
> >> > > am.getProcessDefinitionInfoByUniqueProcessDefinitionName(
> >> sc.getSessionHandle(),
> >> > >
> >> > > proc.manager()
> >> >
> >> >
> >> .name());
> >> > >            am.getProcessCreatedTime(sc.getSessionHandle(), proc.key
> >> ());
> >> > >            am.getActivityCreatedTime(sc.getSessionHandle(),
> proc.key
> >> (),
> >> > > act.key());
> >> > >            DeadlineInfo[] difo =
> >> > > am.getDeadlineInfoForActivity(sc.getSessionHandle(),
> >> > >
> >> proc.key(),
> >> > >
> >> act.key
> >> ());
> >> > >            ut.commit();
> >> > >            long te = System.currentTimeMillis();
> >> > >
> >> > >            System.out.println("Assignment no. "
> >> > >                               + (i + 1) + ": act=" + act.key() + ",
> >> exec lasted "
> >> > >                               + (te - ti) + " ms");
> >> > >
> >> > >         }
> >> > >         t3 = System.currentTimeMillis();
> >> > >
> >> > >         System.out.println("Overal exec lasted "
> >> > >                            + (t3 - t1) + " ms, midTime=" + (t2 -
> >> t1) +
> >> " ms,
> >> > > avgTime="
> >> > >                            + (t3 - t2) / ass.length + " ms");
> >> > >
> >> > >
> >> > > And here is the output:
> >> > >
> >> > > Assignment no. 1:
> >> act=269_24_deadline_examples_do_something_do_something2,
> >> > > exec lasted 31 ms
> >> > > Assignment no. 2:
> >> act=21_16_workflow_patterns_WfSP2_Implicit_Termination_A,
> >> > > exec lasted 16 ms
> >> > > Assignment no. 3:
> >> act=261_8_workflow_patterns_WfBCP4_Exclusive_Choice_B, exec
> >> > > lasted 31 ms
> >> > > Assignment no. 4:
> >> act=8_7_workflow_patterns_WfBCP3_Synchronization_A,
> >> exec
> >> > > lasted 31 ms
> >> > > Assignment no. 5:
> >> > > act=22_17_workflow_patterns_WfPIMI1_MI_without_synchronization_A,
> >> exec
> >> lasted
> >> > > 16 ms
> >> > > Assignment no. 6:
> >> > >
> >>
> act=263_21_deadline_examples_several_async_and_one_sync_deadline_see_log,
> >>
> >> exec
> >> > > lasted 31 ms
> >> > > Assignment no. 7: act=271_2_test_js_manufacturing_produce_part2,
> >> exec
> >> lasted
> >> > > 32 ms
> >> > > Assignment no. 8: act=1_1_test_js_basic_A1, exec lasted 31 ms
> >> > > Assignment no. 9:
> >> act=16_13_workflow_patterns_WfABSP4_Discriminator_A,
> >> exec
> >> > > lasted 15 ms
> >> > > Assignment no. 10:
> >> > >
> >>
> act=25_20_deadline_examples_simple_async_and_sync_deadline_do_something,
> >> exec
> >> > > lasted 47 ms
> >> > > Assignment no. 11:
> act=31_25_test_js_mail_handling_enter_parameters,
> >> exec
> >> > > lasted 32 ms
> >> > > Assignment no. 12:
> >> act=20_15_workflow_patterns_WfSP1_Arbitrary_Cycles_A, exec
> >> > > lasted 15 ms
> >> > > Assignment no. 13:
> >> act=11_10_workflow_patterns_WfABSP1_Multiple_Choice_A, exec
> >> > > lasted 16 ms
> >> > > Assignment no. 14: act=6_5_workflow_patterns_WfBCP1_Sequence_A,
> exec
> >> lasted 31 ms
> >> > > Assignment no. 15:
> >> > > act=28_22_deadline_examples_block_sync_deadline_do_something1, exec
> >> lasted 16 ms
> >> > > Assignment no. 16: act=270_2_test_js_manufacturing_produce_part1,
> >> exec
> >> lasted
> >> > > 15 ms
> >> > > Assignment no. 17:
> >> act=7_6_workflow_patterns_WfBCP2_Parallel_Split_A,
> >> exec
> >> > > lasted 47 ms
> >> > > Assignment no. 18: act=5_4_test_js_publish_doc_submit_document,
> exec
> >> lasted 16 ms
> >> > > Assignment no. 19: act=3_3_test_js_specrelease_specification, exec
> >> lasted 47 ms
> >> > > Assignment no. 20:
> >> act=12_11_workflow_patterns_WfABSP2_Synchronizing_Merge_A,
> >> > > exec lasted 15 ms
> >> > > Assignment no. 21:
> >> > >
> >>
> act=23_18_workflow_patterns_WfPIMI2_MI_with_a_priori_known_design_time_knowledge_A,
> >>
> >> > > exec lasted 16 ms
> >> > > Assignment no. 22:
> >> act=19_14_workflow_patterns_WfABSP5_N_out_of_M_Join_A, exec
> >> > > lasted 31 ms
> >> > > Assignment no. 23:
> act=10_9_workflow_patterns_WfBCP5_Simple_Merge_A,
> >> exec
> >> > > lasted 16 ms
> >> > > Assignment no. 24:
> >> act=13_12_workflow_patterns_WfABSP3_Multiple_Merge_A, exec
> >> > > lasted 31 ms
> >> > > Assignment no. 25:
> >> > > act=24_19_deadline_examples_simple_sync_deadline_do_something, exec
> >> lasted 31 ms
> >> > > Overal exec lasted 703 ms, midTime=47 ms, avgTime=26 ms
> >> > >
> >> > >
> >> > > As you can see, the average time for getting requested
> >> information is
> >> 26ms per
> >> > > assignment which I think is good enough.
> >> > >
> >> > > I assume you are using Shark1.1 version? If so, it can greatly
> >> improve
> >> > > performance if you turn-off Security API  (by commenting
> appropriate
> >> line in
> >> > > Shark.conf).
> >> > > The greatest improvement would be if you would do your queries
> using
> >> single
> >> > > SharkTransaction (in your example there are more than 10
> >> transactions
> >> > > implicitly created). In Shark1.1 it would be something like:
> >> > >
> >> > > SharkTransaction st=null;
> >> > > try {
> >> > >  st=Shark.getInstance().createTransaction();
> >> > >  WfActivity activity = assignment.activity(st);
> >> > >  activity.key(st);
> >> > >  activity.name(st);
> >> > >  WfProcess process = activity.container(st);
> >> > >  process.name(st);
> >> > >  adminMisc.getProcessMgrPkgId(st,process.manager(st).name(st));
> >> > >  adminMisc.getProcessCreatedTime(st,process.key(st));
> >> > >  adminMisc.getActivityCreatedTime(st,process.key(st),activity.key
> >> (st));
> >> > >  DeadlineInfo[] deadlineInfos =
> >> > > deadlineAdministration.getDeadlineInfo(st,process.key(st),
> >> activity.key(st));
> >> > >
> >> > > } catch (Exception ex) {
> >> > >  Shark.getInstance().emptyCaches();
> >> > > } finally {
> >> > >  try {
> >> > >    st.release();
> >> > >  } catch (Exception ex) {}
> >> > >    try {
> >> > >      Shark.getInstance().unlockProcesses(st);
> >> > >    } catch (Exception ex) {}
> >> > > }
> >> > >
> >> > > Greetings,
> >> > > Sasa.
> >> > >
> >> > > [email protected] wrote:
> >> > >> I am facing the problem of very slow response from shark when
> >> getting
> >> > >> information about process and activities.
> >> > >>
> >> > >> my code is:
> >> > >>
> >> > >> WfAssignment
> >> > >>
> >> assignment=connection.getResourceObject().get_sequence_work_item(0);
> >> > >>
> >> > >> WfActivity activity = assignment.activity();
> >> > >> activity.key());
> >> > >> activity.name());
> >> > >> WfProcess process = activity.container();
> >> > >> process.name());
> >> > >> adminMisc.getProcessMgrPkgId(process.manager().name()));
> >> > >> adminMisc.getProcessCreatedTime(process.key())));
> >> > >> adminMisc.getActivityCreatedTime(process.key(),activity.key())));
> >> > >> DeadlineInfo[] deadlineInfos =
> >> > >> deadlineAdministration.getDeadlineInfo(process.key(), activity.key
> >> ());
> >> > >>
> >> > >>
> >> > >> this part of code takes about 545 Milli seconds each time i call
> >> that
> >> code.
> >> > >> in fact i need to call that code for each activity assigned to a
> >> user, so for
> >> > >> example if the user have 20 activities approximately the time
> taken
> >> in
> >> > >> getting those information is about 10 seconds for each user
> >> which is
> >> not
> >> > >> acceptable at all so am asking if their is a way to enhance the
> >> performance
> >> > >> of that code or any sort of shark configuration available to
> >> enhance
> >> the
> >> > >> shark performance.
> >> > >>
> >> > >> regards Ramy
> >> > >>
> >> > >>
> >>
> ------------------------------------------------------------------------
> >> > >>
> >> > >>
> >> > >> --
> >> > >> You receive this message as a subscriber of the
> >> [email protected]
> >> > >> list.
> >> > >> To unsubscribe: mailto:[email protected]
> >> > >> For general help: mailto:[email protected]?subject=help
> >> > >> ObjectWeb mailing lists service home page:
> >> http://www.objectweb.org/wws
> >> > >>
> >> > >
> >> > >
> >> > >
> >>
> --------------------------------------------------------------------------------
> >>
> >> > >
> >> > >
> >> > > --
> >> > > You receive this message as a subscriber of the
> >> [email protected] list.
> >> > > To unsubscribe: mailto:[email protected]
> >> > > For general help: mailto:[email protected]?subject=help
> >> > > ObjectWeb mailing lists service home page:
> >> http://www.objectweb.org/wws
> >> > >
> >> >
> >> >
> >> >
> >>
> ------------------------------------------------------------------------
> >> >
> >> >
> >> > --
> >> > You receive this message as a subscriber of the
> >> [email protected] list.
> >> > To unsubscribe: mailto:[email protected]
> >> > For general help: mailto:[email protected]?subject=help
> >> > ObjectWeb mailing lists service home page:
> >> http://www.objectweb.org/wws
> >> >
> >>
> >>
> >>
> >>
> >>
> >> --
> >> You receive this message as a subscriber of the
> >> [email protected] list.
> >> To unsubscribe: mailto:[email protected]
> >> For general help: mailto:[email protected]?subject=help
> >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >>
> >>
> >>
> >
> > ------------------------------------------------------------------------
> >
> >
> > --
> > You receive this message as a subscriber of the [email protected] list.
> > To unsubscribe: mailto:[email protected]
> > For general help: mailto:[email protected]?subject=help
> > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >
>
>
>
>
>
> --
> You receive this message as a subscriber of the [email protected] list.
> To unsubscribe: mailto:[email protected]
> For general help: mailto:[email protected]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

------=_Part_16079_7043554.1166616571457
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi<br>yes i switched off the Security API and the time stamps i sent is with Security API swithched off.<br><br>also i want to ask when their will be Shark2.0 release not beta because i can&#39;t use a beta versions.<br><br>
Also i need to know is their any differences in Shark2.0-beta7 from code handling perspective.<br><br>At last i need to know how to handle enumeration attribute type from a code perspective.<br><br>and thanks for your cooperation 
<br><br>Greetings,<br>Ramy.<br><br><br><div><span class="gmail_quote">On 12/20/06, <b class="gmail_sendername">Sasa Bojanic</b> &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>did you try to switch-off Security API? It should also improve the<br>performance with shark1.1.<br><br>Just for your information, the Shark2.0-beta7 version is coming with<br>SwingAdmin application + WEB Admin application + some other useful
<br>client utilities...<br><br>Greetings,<br>Sasa.<br><br>Ramy Khalil wrote:<br>&gt; Dear Sasa Bojanic<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; First i would like to thank u for your fast response.<br>&gt; i am using shark 1.1 as you assumed because simply i can&#39;t use a beta
<br>&gt; version (company policy).<br>&gt; i changed my code to use SharkTransaction and it really improved the<br>&gt; performance.i cerated 25 assignments and i got that result:<br>&gt; Assignment no 0 lasted: 94ms<br>&gt; Assignment no 1 lasted: 78ms
<br>&gt; Assignment no 2 lasted: 110ms<br>&gt; Assignment no 3 lasted: 94ms<br>&gt; Assignment no 4 lasted: 94ms<br>&gt; Assignment no 5 lasted: 63ms<br>&gt; Assignment no 6 lasted: 94ms<br>&gt; Assignment no 7 lasted: 94ms
<br>&gt; Assignment no 8 lasted: 93ms<br>&gt; Assignment no 9 lasted: 94ms<br>&gt; Assignment no 10 lasted: 79ms<br>&gt; Assignment no 11 lasted: 78ms<br>&gt; Assignment no 12 lasted: 125ms<br>&gt; Assignment no 13 lasted: 110ms
<br>&gt; Assignment no 14 lasted: 78ms<br>&gt; Assignment no 15 lasted: 94ms<br>&gt; Assignment no 16 lasted: 110ms<br>&gt; Assignment no 17 lasted: 94ms<br>&gt; Assignment no 18 lasted: 78ms<br>&gt; Assignment no 19 lasted: 78ms
<br>&gt; Assignment no 20 lasted: 94ms<br>&gt; Assignment no 21 lasted: 63ms<br>&gt; Assignment no 22 lasted: 110ms<br>&gt; Assignment no 23 lasted: 266ms<br>&gt; Assignment no 24 lasted: 172ms<br>&gt; time taken: 2537 for total
<br>&gt; with shark1.1<br>&gt;<br>&gt; which is an improvement but still not the desired performance.<br>&gt;<br>&gt; i know that you will say use Shark 2.0.7 beta but as i said i can&#39;t use a<br>&gt; beta version according to my company policy also i downloaded shark
<br>&gt; 2.0.5beta but i does not have the swing admin interface and the batch<br>&gt; file (<br>&gt; runsa.bat).<br>&gt;<br>&gt; On 12/20/06, Sasa Bojanic &lt;<a href="mailto:[email protected]">[email protected]</a>
&gt; wrote:<br>&gt;&gt;<br>&gt;&gt; Hi,<br>&gt;&gt;<br>&gt;&gt; as I said, these are the tests with the latest 2.0-beta7 shark version<br>&gt;&gt;<br>&gt;&gt; Sasa.<br>&gt;&gt;<br>&gt;&gt; Thomas Buffagni wrote:<br>&gt;&gt; &gt; Hi Sasa Bojanic,
<br>&gt;&gt; &gt; I&#39;m curious to know what is the execution time of the same code below<br>&gt;&gt; with the<br>&gt;&gt; &gt; latest version of shark...Does anybody have made some tests&nbsp;&nbsp;? -<br>&gt;&gt; Thomas.<br>&gt;&gt; &gt;
<br>&gt;&gt; &gt; Sasa Bojanic ha scritto:<br>&gt;&gt; &gt; &gt; Hi,<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt; I made some tests on Shark2.0-beta7 using MySQL database.<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt; Here is the code snippet:
<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; long t1, t2, t3;<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t1 = System.currentTimeMillis();<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ut.begin();<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WfAssignment[] ass = 
sc.getResourceObject<br>&gt;&gt; ().get_sequence_work_item(0);<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ut.commit();<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t2 = System.currentTimeMillis();<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int i = 0; i &lt; 
ass.length; i++) {<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;long ti = System.currentTimeMillis();<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ut.begin();<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WfAssignment as = ass[i];<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WfActivity act = 
as.activity();<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;act.key();<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;act.name();<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WfProcess proc = act.container();<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proc.name();<br>&gt;&gt; &gt; &gt;
<br>&gt;&gt; &gt; &gt; am.getProcessDefinitionInfoByUniqueProcessDefinitionName(<br>&gt;&gt; sc.getSessionHandle(),<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt; proc.manager()<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; .name());
<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;am.getProcessCreatedTime(sc.getSessionHandle(), proc.key<br>&gt;&gt; ());<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;am.getActivityCreatedTime(sc.getSessionHandle(), proc.key<br>&gt;&gt; (),<br>&gt;&gt; &gt; &gt; 
act.key());<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DeadlineInfo[] difo =<br>&gt;&gt; &gt; &gt; am.getDeadlineInfoForActivity(sc.getSessionHandle(),<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; proc.key(),<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; 
act.key<br>&gt;&gt; ());<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ut.commit();<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;long te = System.currentTimeMillis();<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(&quot;Assignment no. &quot;
<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + (i + 1) + &quot;: act=&quot; + act.key() + &quot;,<br>&gt;&gt; exec lasted &quot;<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + (te - ti) + &quot; ms&quot;);<br>
&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t3 = System.currentTimeMillis();<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(&quot;Overal exec lasted &quot;<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ (t3 - t1) + &quot; ms, midTime=&quot; + (t2 -
<br>&gt;&gt; t1) +<br>&gt;&gt; &quot; ms,<br>&gt;&gt; &gt; &gt; avgTime=&quot;<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ (t3 - t2) / ass.length + &quot; ms&quot;);<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt; And here is the output:
<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt; Assignment no. 1:<br>&gt;&gt; act=269_24_deadline_examples_do_something_do_something2,<br>&gt;&gt; &gt; &gt; exec lasted 31 ms<br>&gt;&gt; &gt; &gt; Assignment no. 2:<br>&gt;&gt; act=21_16_workflow_patterns_WfSP2_Implicit_Termination_A,
<br>&gt;&gt; &gt; &gt; exec lasted 16 ms<br>&gt;&gt; &gt; &gt; Assignment no. 3:<br>&gt;&gt; act=261_8_workflow_patterns_WfBCP4_Exclusive_Choice_B, exec<br>&gt;&gt; &gt; &gt; lasted 31 ms<br>&gt;&gt; &gt; &gt; Assignment no. 4:
<br>&gt;&gt; act=8_7_workflow_patterns_WfBCP3_Synchronization_A,<br>&gt;&gt; exec<br>&gt;&gt; &gt; &gt; lasted 31 ms<br>&gt;&gt; &gt; &gt; Assignment no. 5:<br>&gt;&gt; &gt; &gt; act=22_17_workflow_patterns_WfPIMI1_MI_without_synchronization_A,
<br>&gt;&gt; exec<br>&gt;&gt; lasted<br>&gt;&gt; &gt; &gt; 16 ms<br>&gt;&gt; &gt; &gt; Assignment no. 6:<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; act=263_21_deadline_examples_several_async_and_one_sync_deadline_see_log,<br>&gt;&gt;
<br>&gt;&gt; exec<br>&gt;&gt; &gt; &gt; lasted 31 ms<br>&gt;&gt; &gt; &gt; Assignment no. 7: act=271_2_test_js_manufacturing_produce_part2,<br>&gt;&gt; exec<br>&gt;&gt; lasted<br>&gt;&gt; &gt; &gt; 32 ms<br>&gt;&gt; &gt; &gt; Assignment no. 8: act=1_1_test_js_basic_A1, exec lasted 31 ms
<br>&gt;&gt; &gt; &gt; Assignment no. 9:<br>&gt;&gt; act=16_13_workflow_patterns_WfABSP4_Discriminator_A,<br>&gt;&gt; exec<br>&gt;&gt; &gt; &gt; lasted 15 ms<br>&gt;&gt; &gt; &gt; Assignment no. 10:<br>&gt;&gt; &gt; &gt;<br>
&gt;&gt; act=25_20_deadline_examples_simple_async_and_sync_deadline_do_something,<br>&gt;&gt; exec<br>&gt;&gt; &gt; &gt; lasted 47 ms<br>&gt;&gt; &gt; &gt; Assignment no. 11: act=31_25_test_js_mail_handling_enter_parameters,
<br>&gt;&gt; exec<br>&gt;&gt; &gt; &gt; lasted 32 ms<br>&gt;&gt; &gt; &gt; Assignment no. 12:<br>&gt;&gt; act=20_15_workflow_patterns_WfSP1_Arbitrary_Cycles_A, exec<br>&gt;&gt; &gt; &gt; lasted 15 ms<br>&gt;&gt; &gt; &gt; Assignment no. 13:
<br>&gt;&gt; act=11_10_workflow_patterns_WfABSP1_Multiple_Choice_A, exec<br>&gt;&gt; &gt; &gt; lasted 16 ms<br>&gt;&gt; &gt; &gt; Assignment no. 14: act=6_5_workflow_patterns_WfBCP1_Sequence_A, exec<br>&gt;&gt; lasted 31 ms
<br>&gt;&gt; &gt; &gt; Assignment no. 15:<br>&gt;&gt; &gt; &gt; act=28_22_deadline_examples_block_sync_deadline_do_something1, exec<br>&gt;&gt; lasted 16 ms<br>&gt;&gt; &gt; &gt; Assignment no. 16: act=270_2_test_js_manufacturing_produce_part1,
<br>&gt;&gt; exec<br>&gt;&gt; lasted<br>&gt;&gt; &gt; &gt; 15 ms<br>&gt;&gt; &gt; &gt; Assignment no. 17:<br>&gt;&gt; act=7_6_workflow_patterns_WfBCP2_Parallel_Split_A,<br>&gt;&gt; exec<br>&gt;&gt; &gt; &gt; lasted 47 ms<br>
&gt;&gt; &gt; &gt; Assignment no. 18: act=5_4_test_js_publish_doc_submit_document, exec<br>&gt;&gt; lasted 16 ms<br>&gt;&gt; &gt; &gt; Assignment no. 19: act=3_3_test_js_specrelease_specification, exec<br>&gt;&gt; lasted 47 ms
<br>&gt;&gt; &gt; &gt; Assignment no. 20:<br>&gt;&gt; act=12_11_workflow_patterns_WfABSP2_Synchronizing_Merge_A,<br>&gt;&gt; &gt; &gt; exec lasted 15 ms<br>&gt;&gt; &gt; &gt; Assignment no. 21:<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; act=23_18_workflow_patterns_WfPIMI2_MI_with_a_priori_known_design_time_knowledge_A,
<br>&gt;&gt;<br>&gt;&gt; &gt; &gt; exec lasted 16 ms<br>&gt;&gt; &gt; &gt; Assignment no. 22:<br>&gt;&gt; act=19_14_workflow_patterns_WfABSP5_N_out_of_M_Join_A, exec<br>&gt;&gt; &gt; &gt; lasted 31 ms<br>&gt;&gt; &gt; &gt; Assignment no. 23: act=10_9_workflow_patterns_WfBCP5_Simple_Merge_A,
<br>&gt;&gt; exec<br>&gt;&gt; &gt; &gt; lasted 16 ms<br>&gt;&gt; &gt; &gt; Assignment no. 24:<br>&gt;&gt; act=13_12_workflow_patterns_WfABSP3_Multiple_Merge_A, exec<br>&gt;&gt; &gt; &gt; lasted 31 ms<br>&gt;&gt; &gt; &gt; Assignment no. 25:
<br>&gt;&gt; &gt; &gt; act=24_19_deadline_examples_simple_sync_deadline_do_something, exec<br>&gt;&gt; lasted 31 ms<br>&gt;&gt; &gt; &gt; Overal exec lasted 703 ms, midTime=47 ms, avgTime=26 ms<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt;
<br>&gt;&gt; &gt; &gt; As you can see, the average time for getting requested<br>&gt;&gt; information is<br>&gt;&gt; 26ms per<br>&gt;&gt; &gt; &gt; assignment which I think is good enough.<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt; I assume you are using 
Shark1.1 version? If so, it can greatly<br>&gt;&gt; improve<br>&gt;&gt; &gt; &gt; performance if you turn-off Security API&nbsp;&nbsp;(by commenting appropriate<br>&gt;&gt; line in<br>&gt;&gt; &gt; &gt; Shark.conf).<br>&gt;&gt; &gt; &gt; The greatest improvement would be if you would do your queries using
<br>&gt;&gt; single<br>&gt;&gt; &gt; &gt; SharkTransaction (in your example there are more than 10<br>&gt;&gt; transactions<br>&gt;&gt; &gt; &gt; implicitly created). In Shark1.1 it would be something like:<br>&gt;&gt; &gt; &gt;
<br>&gt;&gt; &gt; &gt; SharkTransaction st=null;<br>&gt;&gt; &gt; &gt; try {<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;st=Shark.getInstance().createTransaction();<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;WfActivity activity = assignment.activity(st);<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;
activity.key(st);<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;activity.name(st);<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;WfProcess process = activity.container(st);<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;process.name(st);<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;adminMisc.getProcessMgrPkgId(st,
process.manager(st).name(st));<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;adminMisc.getProcessCreatedTime(st,process.key(st));<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;adminMisc.getActivityCreatedTime(st,process.key(st),activity.key<br>&gt;&gt; (st));<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;DeadlineInfo[] deadlineInfos =
<br>&gt;&gt; &gt; &gt; deadlineAdministration.getDeadlineInfo(st,process.key(st),<br>&gt;&gt; activity.key(st));<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt; } catch (Exception ex) {<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;Shark.getInstance
().emptyCaches();<br>&gt;&gt; &gt; &gt; } finally {<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;try {<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;st.release();<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;} catch (Exception ex) {}<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;try {<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Shark.getInstance().unlockProcesses(st);<br>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;} catch (Exception ex) {}<br>&gt;&gt; &gt; &gt; }<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt; Greetings,<br>&gt;&gt; &gt; &gt; Sasa.<br>&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; <a href="mailto:[email protected]">[email protected]</a> wrote:<br>&gt;&gt; &gt; &gt;&gt; I am facing the problem of very slow response from shark when<br>&gt;&gt; getting<br>&gt;&gt; &gt; &gt;&gt; information about process and activities.
<br>&gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; &gt; &gt;&gt; my code is:<br>&gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; &gt; &gt;&gt; WfAssignment<br>&gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; assignment=connection.getResourceObject().get_sequence_work_item(0);
<br>&gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; &gt; &gt;&gt; WfActivity activity = assignment.activity();<br>&gt;&gt; &gt; &gt;&gt; activity.key());<br>&gt;&gt; &gt; &gt;&gt; activity.name());<br>&gt;&gt; &gt; &gt;&gt; WfProcess process = 
activity.container();<br>&gt;&gt; &gt; &gt;&gt; process.name());<br>&gt;&gt; &gt; &gt;&gt; adminMisc.getProcessMgrPkgId(process.manager().name()));<br>&gt;&gt; &gt; &gt;&gt; adminMisc.getProcessCreatedTime(process.key())));
<br>&gt;&gt; &gt; &gt;&gt; adminMisc.getActivityCreatedTime(process.key(),activity.key())));<br>&gt;&gt; &gt; &gt;&gt; DeadlineInfo[] deadlineInfos =<br>&gt;&gt; &gt; &gt;&gt; deadlineAdministration.getDeadlineInfo(process.key
(), activity.key<br>&gt;&gt; ());<br>&gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; &gt; &gt;&gt; this part of code takes about 545 Milli seconds each time i call<br>&gt;&gt; that<br>&gt;&gt; code.<br>&gt;&gt; &gt; &gt;&gt; in fact i need to call that code for each activity assigned to a
<br>&gt;&gt; user, so for<br>&gt;&gt; &gt; &gt;&gt; example if the user have 20 activities approximately the time taken<br>&gt;&gt; in<br>&gt;&gt; &gt; &gt;&gt; getting those information is about 10 seconds for each user<br>
&gt;&gt; which is<br>&gt;&gt; not<br>&gt;&gt; &gt; &gt;&gt; acceptable at all so am asking if their is a way to enhance the<br>&gt;&gt; performance<br>&gt;&gt; &gt; &gt;&gt; of that code or any sort of shark configuration available to
<br>&gt;&gt; enhance<br>&gt;&gt; the<br>&gt;&gt; &gt; &gt;&gt; shark performance.<br>&gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; &gt; &gt;&gt; regards Ramy<br>&gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; ------------------------------------------------------------------------
<br>&gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; &gt; &gt;&gt; --<br>&gt;&gt; &gt; &gt;&gt; You receive this message as a subscriber of the<br>&gt;&gt; <a href="mailto:[email protected]">[email protected]
</a><br>&gt;&gt; &gt; &gt;&gt; list.<br>&gt;&gt; &gt; &gt;&gt; To unsubscribe: mailto:<a href="mailto:[email protected]">[email protected]</a><br>&gt;&gt; &gt; &gt;&gt; For general help: mailto:
<a href="mailto:[email protected]">[email protected]</a>?subject=help<br>&gt;&gt; &gt; &gt;&gt; ObjectWeb mailing lists service home page:<br>&gt;&gt; <a href="http://www.objectweb.org/wws">http://www.objectweb.org/wws
</a><br>&gt;&gt; &gt; &gt;&gt;<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; --------------------------------------------------------------------------------<br>&gt;&gt;<br>&gt;&gt; &gt; &gt;
<br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt; &gt; --<br>&gt;&gt; &gt; &gt; You receive this message as a subscriber of the<br>&gt;&gt; <a href="mailto:[email protected]">[email protected]</a> list.<br>&gt;&gt; &gt; &gt; To unsubscribe: mailto:
<a href="mailto:[email protected]">[email protected]</a><br>&gt;&gt; &gt; &gt; For general help: mailto:<a href="mailto:[email protected]">[email protected]</a>?subject=help<br>&gt;&gt; &gt; &gt; ObjectWeb mailing lists service home page:
<br>&gt;&gt; <a href="http://www.objectweb.org/wws">http://www.objectweb.org/wws</a><br>&gt;&gt; &gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; ------------------------------------------------------------------------
<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; --<br>&gt;&gt; &gt; You receive this message as a subscriber of the<br>&gt;&gt; <a href="mailto:[email protected]">[email protected]</a> list.<br>&gt;&gt; &gt; To unsubscribe: mailto:
<a href="mailto:[email protected]">[email protected]</a><br>&gt;&gt; &gt; For general help: mailto:<a href="mailto:[email protected]">[email protected]</a>?subject=help<br>&gt;&gt; &gt; ObjectWeb mailing lists service home page:
<br>&gt;&gt; <a href="http://www.objectweb.org/wws">http://www.objectweb.org/wws</a><br>&gt;&gt; &gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; --<br>&gt;&gt; You receive this message as a subscriber of the
<br>&gt;&gt; <a href="mailto:[email protected]">[email protected]</a> list.<br>&gt;&gt; To unsubscribe: mailto:<a href="mailto:[email protected]">[email protected]</a><br>&gt;&gt; For general help: mailto:
<a href="mailto:[email protected]">[email protected]</a>?subject=help<br>&gt;&gt; ObjectWeb mailing lists service home page: <a href="http://www.objectweb.org/wws">http://www.objectweb.org/wws</a><br>&gt;&gt;<br>&gt;&gt;
<br>&gt;&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt;<br>&gt; --<br>&gt; You receive this message as a subscriber of the <a href="mailto:[email protected]">
[email protected]</a> mailing list.<br>&gt; To unsubscribe: mailto:<a href="mailto:[email protected]">[email protected]</a><br>&gt; For general help: mailto:<a href="mailto:[email protected]">
[email protected]</a>?subject=help<br>&gt; ObjectWeb mailing lists service home page: <a href="http://www.objectweb.org/wws">http://www.objectweb.org/wws</a><br>&gt;<br><br><br><br><br><br>--<br>You receive this message as a subscriber of the 
<a href="mailto:[email protected]">[email protected]</a> mailing list.<br>To unsubscribe: mailto:<a href="mailto:[email protected]">[email protected]</a><br>For general help: mailto:<a href="mailto:[email protected]">
[email protected]</a>?subject=help<br>ObjectWeb mailing lists service home page: <a href="http://www.objectweb.org/wws">http://www.objectweb.org/wws</a><br><br><br></blockquote></div><br>

------=_Part_16079_7043554.1166616571457--


------------=_1166616617-5041-109
Content-Type: text/plain; name="message-footer.txt"
Content-Disposition: inline; filename="message-footer.txt"
Content-Transfer-Encoding: 8bit


--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

------------=_1166616617-5041-109--