Toad World® Forums

Reformat of large program takes long - no progress visible

All,

I’m currently on Toad 12.11.0.7.

I have a package body that is some 15K lines in size.
When I reformat, it takes quite some time.

First it reformats, then it repositions.
After that it seems to be done but it takes a few seconds more before
the edit session becomes responsive again.

Just wondering: what’s happening during the delay after the display has repositioned?

Also, could we have a progress bar or some other indication of progress (only for long-running reformats)
so that I can see when the waiting is over? I now have to type something and then wait
until a response is shown…

Kind regards,
Abe Kornelis

What is large for you?

Many lines or smaller number of very long lines

or…both?

:slight_smile:

Any numbers?

P.S.

This is fully related to client PC (free RAM and CPU)

After formatting has finished and the caret has been positioned the only slow event I can see is waiting for a full parse so we can load breakpoints if any were set. The code to parse could be moved to make it not fire if there are no breakpoints to set. If you click the refresh button on the Navigator is the wait time there approximately what you experience following the format?

Michael

Damir,

the number of lines before formatting is 15689 with the longest line being 314 characters long.
Since the code is generated, I can use a modified version of the generator query to determine max length.

After formatting 16822 lines, max length between 150 and 200 chars
(educated guess since there is no option to sort code by line length).

Abe

Michael,

I’m on 12.11.0.8 now, and the effect seems to have disappeared.

I suggest we leave this issue alone, unless it resurfaces.

Kind regards,
Abe

Hi Abe,

IMHO, 150-200 lines of code in line is not a good practice in programming.
Makes code pretty heavy to maintain: to check that, please right click in editor, choose from popup menu Analyze|Send code to Analysis window. Look what certified code metrics tools will tell you. I’m pretty sure that you will get very bad response…
This was just mine 5c thoughts …
Brg
Damir

Damir,

in general, I do agree. In this case, I suspect there’s quite some trailing – comments.

also be aware that raw generated code has this very long line.
We have our formatter cut-off point at 150 characters.

After formatting things should be better.
I’d have liked to try your suggestion - but the Analysis option is not on my popup :frowning:

Abe

Which Toad version you have?

Damir,

I can see the option iinyour display. It is absent from mine.
My current version is 12.11. 0.8 - should be good enough.

Could this be a licensing issue?

Abe

Please post Help|About picture.

Damir,

Here you are:
5074.Capture.png

Kind regards,
Abe

Base edition.

I’m afraid there is no option for that Toad version.

Ok, I can live with that.

About a year ago, I was promised a more complete license in reward for my testing efforts.
It seems nothing came of it. Too bad - I’d have been quite happy to give it a try!

Abe

Hello Abe,

The latter was promised and you should have it. I now just sent an email about that to fix it.

Andre

Andre,

thanks. I should blame myself for not inquiring and letting it pass by.

Kind regards,
Abe