Skip to Content
0

Performance improvement of report

Jun 08, 2017 at 10:22 AM

192

avatar image

Hi All,

We have a zee program which is usually runs in background. The program finds the open sales order. it usually takes around 480 seconds to execute and client want the execution time to be reduced. I have check it in st12 from my end.

St12 shows maximum time cunsumption under ABAP head, the database and the system heads are pretty ok.

Could you please let me know if it is possible to reduce ABAP time? PFB the screenshot.

abap.png

abap.png (111.5 kB)
10 |10000 characters needed characters left characters exceeded

Did you really measure a dialog? (call screen) Or is it a batch input?

0
Further commenting has been locked.
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Raymond Giuseppi
Jun 09, 2017 at 09:04 AM
3

Seems you cannot do many things with this information, 99% of the time consumption is transfer of data between screen (or emulation of screnn in background?) and program. Which tool create the output: alv, html, spool. Could you post the analyzis in the original sort order. What are the statements executed before/after the 99% screen data exchange?

Share
10 |10000 characters needed characters left characters exceeded
Kiran K Jun 08, 2017 at 10:38 AM
1

Makrand,

ST12 also gives us the detailed view regarding the flow of processing logic step by step along with the runtime.

Going by that you have to identify which part of processing logic is consuming more time and then analyse on the options of optimising the performance of that part.

K.Kiran.

Share
10 |10000 characters needed characters left characters exceeded
Raju Shrestha Jun 08, 2017 at 07:13 PM
-4

You need to execute your program in debug mode and do F5 for every step and figure out which statement is taking the maximum time.

Check for For All Entries without initial check and without DELETE ADJACENT Duplicates. And READ statement without SORT and BINARY.

Narrow down which statement which is the bottle neck and update us.

Raju

Show 14 Share
10 |10000 characters needed characters left characters exceeded

That's what the performance analysis is for.

1

No, no! Stepping through F5 in debug is much faster and more accurate! Even better if done with a stopwatch in your hand.

(for those who might not get it: I'm being sarcastic, that's probably the least efficient way to measure performance)

4

What ? Being Sarcastic ???

2

Mike - Rather than being sarcastic - you could have written one line of suggestion for the question asked by Makarand. Do you think your sarcasm helped anyone? What help/suggestion did you provide?

Sometimes going to the basic helps. If I need to tune my code, I believe in scanning through the code myself and F5 does help.. Correct them. F5 is not done for performance tuning.. I hope you know that or does one need to be more explicit?

After you sanitize the code, then take help of the tool for more situation which you cannot look with naked eyes. In Makarand's case, it takes 480 seconds.. So ST12 scan might show the standard calls and other system calls in SAP as the culprit (and you cannot do much about them).

Tools are provided to help us, not to replace us. Keep that in mind.

Makarand - Go through your code. Check for obvious flaws. Narrow down, which routine, select, read or loop is taking more time. Then look for alternative. Do not go with bombastic suggestions. Usually solution to seemingly big problems are very simple and it may be very basic.

Raju.

1

Tools are provided to help us, not to replace us. Keep that in mind.

Whatever debugging method you have suggested can be done automatically via the SAT "tool". Why do i need to do debug the application to find out the which piece of code is leading to a poor runtime?

I am not sure if you've read this blog series about SAT -> https://blogs.sap.com/2011/01/18/next-generation-abap-runtime-analysis-sat-how-to-analyze-performance/

Check for For All Entries without initial check and without DELETE ADJACENT Duplicates.

One can configure the ATC "tool" Check-Variant to do the "initial" check.

And READ statement without SORT and BINARY. --> There's an ATC check for that too!

So basically all the options which you've suggested can be automated. Yes, the tools can sometimes produce false positives, and that's why the results must be analysed by a pair of eyes.

Do not go with bombastic suggestions.

I don't see what's "bombastic" in these suggestions? IMO they're more pragmatic.

0

That's what I am trying to say. Do not waste the space by being sarcastic.. Provide the positive direction which helps. If not, move on and do not care to write anything if you cannot add any value.. No matter who you are. If you cannot provide a solution or even a suggestion, then just do not respond. Period!!

By the way your link helps. To be frank I have never checked this blog post (although I have been using SAT, ATC, ST12...).

https://blogs.sap.com/2011/01/18/next-generation-abap-runtime-analysis-sat-how-to-analyze-performance/

Hopefully Makarand would get closer to his solution with the link.

Users want such leads which will help. No sarcasm please!!

By the way, if I were Makarand - I would still scan the code to remove the obvious flaws, narrow down the zone and then use the tools. If I review someone else's code, I still go through the code with my naked eyes and then use the tool at the end. Not that I do not like automation or trust the tool, but because I want to eliminate the simple stuffs and then give the tool to do the subtle churning.. Hopefully, I am not the only black sheep.

Raju.

1

I agree. I guess this thread doesn't deserve any more discussion.

1

The reason I did not reply to the question is because a) I did not feel the need to duplicate the good advice that had already been provided by others, and b) the OP didn't seem very responsive or engaging in his own topic.

I apologise if you found sarcasm offensive, I shall be more direct in future. Sometimes advice, even if well-meant, can make matters worse, and I believe refuting such statements can be of benefit then I will do so. Your initial advice "You need to execute your program in debug mode and do F5 for every step and figure out which statement is taking the maximum time." is off the mark for a performance investigation. Why should he spend hours debugging if he can get a much better picture in minutes by following Kiran's and Raymond's suggestions? Therefore my intention was to direct the OP towards the other responses. Debugging is not the way to tackle a performance issue until it has been properly investigated with the available tools.

3

"And READ statement without SORT and BINARY." Not since before 2000. Now you should say "READ statement without defining an appropriate key on the internal table".

0
Matthew Billingham

Matt,

You mean a read statement without prior sort/binary search is no longer a potential threat in the latest versions ?

K.Kiran.

1

No, I mean you shouldn't be using SORT/BINARY SEARCH at all. You should be using a SORTED or HASHED table with an appropriate key. Or even add a secondary index to your internal table.

2

Mathew - You are right. SORTED/HASHED is the better option. But without looking at Makarand's code, it was just the blind suggestion what developers usually do wrong. If everything in the world was perfect, then there would not have been the performance issue..

Mathew - What answer/solution did your provide to Makarand?

Raju.

0

But the blind suggestion should have been "Make sure any table reads are from properly typed and indexed tables". Or "Make sure any table reads are from HASHED or SORTED tables, using their key, or a secondary key".

BINARY SEARCH/SORT is very old style of programming that hasn't been necessary for over 17 years.

2

Thanks Matthew. This helps.

Raju.

0
Further commenting has been locked.