cancel
Showing results for 
Search instead for 
Did you mean: 

Execution time of transactions

matthias_prller
Participant
0 Kudos

Hi,

I'm a bit confused about a the execution time of transactions in a transaction.

I just wrote a transaction which calls four other transactions (just for time testing) and I get the following result:


[INFO ]: Execution Started At: 09:11:37
[INFO ]: Execution Started At: 09:11:37
[INFO ]: Execution Completed At: 09:11:37 Elapsed Time was 453 mS
[INFO ]: Execution Started At: 09:11:38
[INFO ]: Execution Completed At: 09:11:38 Elapsed Time was 31 mS
[INFO ]: Execution Started At: 09:11:38
[INFO ]: Execution Completed At: 09:11:38 Elapsed Time was 109 mS
[INFO ]: Execution Started At: 09:11:38
[INFO ]: Execution Completed At: 09:11:38 Elapsed Time was 125 mS
[INFO ]: Execution Completed At: 09:11:38 Elapsed Time was 1547 mS

the first 4 time information are from the calles transaction. The last time information is from the "outer" transaction.

But I just call the 4 transactions and don't do anything else. Why is there such a big time difference? (more then double of time) And how can I solve this problem?

Thanks

Matthias

Accepted Solutions (1)

Accepted Solutions (1)

matthias_prller
Participant
0 Kudos

just to be more precise:

I have enabled the checkbox: reload transaction after execution.

If I disable this checkbox I get a much better result:


[INFO ]: Execution Started At: 11:08:20
[INFO ]: Execution Started At: 11:08:20
[INFO ]: Execution Completed At: 11:08:20 Elapsed Time was 547 mS
[INFO ]: Execution Started At: 11:08:20
[INFO ]: Execution Completed At: 11:08:20 Elapsed Time was 31 mS
[INFO ]: Execution Started At: 11:08:20
[INFO ]: Execution Completed At: 11:08:21 Elapsed Time was 110 mS
[INFO ]: Execution Started At: 11:08:21
[INFO ]: Execution Completed At: 11:08:21 Elapsed Time was 140 mS
[INFO ]: Execution Completed At: 11:08:21 Elapsed Time was 844 mS

With this result I have a new question:

What requiremnts do I need to execute a transaction as "do not reload after execution".

In the SAP training they teached me to set always the checkbox.

Regards

Matthias

jcgood25
Active Contributor
0 Kudos

Matthias,

You are only seeing the times that represent the actual running of the TRX itself, not the loading and parsing of the TRX file, so that would likely explain the difference you are seeing on your stopwatch. In the execution logger window in MII version 12.1 (recently entered ramp-up) you will see many more timing results logged, including load time and not just execution time.

As far as the "Reset state" checkbox on the configure dialog of the Transaction call action, this is intended to provide performance optimization and only do the loading/parsing of the TRX once.

If the box is checked and you only call the TRX action once in your logic flow I don't think it really makes any difference because the runner servlet has to load/parse the file at least once no matter what.

If you are calling a utility type transaction in a Repeater loop there is no reason to reload it each time (so the recommendation would be to keep it unchecked), but just to call it with the new inputs and get the new outputs. So when this box is unchecked you should gain back the load/parse time every time it is called (beyond the initial load). You will need to ensure that you manage your properties, perhaps having a Reset Assignment action that initializes any Local properties, because any loop counters that you increment or booleans that you set will remain in their last execution state, not the default value. You shouldn't have to worry about Transaction inputs too much unless you are not setting them in the TRX call, but by unchecking the box you really just have to manage your logic variables effectively.

Regards,

Jeremy

Former Member
0 Kudos

Matthias,

if you use the "Ctrl-F5" or the "Transaction > Execute" from the workbench menu, you will get some more details on the performance of the transaction. Starting the BLT this way will also show the time spend to begin and end of an action.

Michael

matthias_prller
Participant
0 Kudos

Jeremy,

If the box is checked and you only call the TRX action once in your logic flow I don't think it really makes any difference because the runner servlet has to load/parse the file at least once no matter what.

Do you mean it doesn't make any differences generally or I performance?

As the "log" shows there is a difference. Even in my original transaktion I feel that it is really faster. But the general results are the same. So I get the same results faster

Just to be sure: The outer transaction and the transaction will be loaded everytime it is called by a user, webservice or what ever. So if the the transaction is startet twice a the same second in different threads they were also loaded twice?

And another question: I don't think it is possible to start a new thread in a transaction, is it? Why I'm asking: In my transaction I have some action that shuld be executed immediately and other action that can be done at a later time. (Some updates / inserts in tables and they aren't critical if they fail). So best solution on performance point of view would be if the main thread runs fast and the User gets the result and all other things run after this. Do I have any chance to do so or is something like this planed in future versions of MII?

I mark this question as answered as my originaly question is answered.

Thank you.

Regards,

Matthias

jcgood25
Active Contributor
0 Kudos

When you run the TRX from inside the Workbench MII also does a temporary save of your existing workspace and then calls the Runner servlet with this temp TRX, shows you the execution logger, then cleans up the temp file. Without the temp save you would have to commit all of your changes to run a quick test, so the system always does this when running a TRX from inside the Workbench. This will also add to the time differences you are observing.

Each user or system request to your main TRX runs in their own thread, so the checkbox in question only has relevance within a single thread (there is no benefit across users).

It's better to have separate threads for follow up questions, even if they somewhat related. MII version 12.1 will introduce an action block similar to the current Transaction action, but it will support asynchronous calls.

Regards,

Jeremy

Answers (0)