Toad World® Forums

High CPU editing large package

Hi there,

Found a problem in Toad 11.0.0.116:

When editing a large packagebody (+6500 lines) the cpu spikes at nearly 100% at EVERY keystroke.
(It seems that the hole package is scanned when a key is pressed ???)

I have tried to disable
“Check Code Analysis Rules as you type” and “Code Insight” but this didn’t help

Any idea of what to disable ???

This problem wasn’t in 10.6

Med venlig hilsen

Finn Jalsøe
BK-IT

Bladkompagniet A/S * Islevdalvej 205 * DK-2610 Rødovre
Tlf: 7020 7225 * Dir. 4451 7171 * Email: fij@bladkompagniet.dk

winmail.dat (50.8 KB)
winmail.dat (9.54 KB)

Does the CPU stop pegging when you stop typing? If so, approximately how long
after you stop typing does the CPU return to normal? If you have the option
Options|Editor|Code Assist|“Check syntax as you type” enabled disable it and try
again. Does that make a difference?

It seems that the hole package is scanned when a key is pressed

It is, but only after a delay. I believe the delay is 500ms. When you pause the
Editor parses the file so that the navigator remains up to date and so that any
other features requiring parser results can execute with minimal delay. This
process runs in a low priority background thread and aborts when you resume
typing. When your CPU is pegged is Toad unresponsive?

Michael


Med,

There’s nothing wrong with having 100% cpu time as long as you don’t get
aware of it. Over time we’ll sure use all your cpu cores more and more in the
background for (hopefully) useful work. On a single core there might perhaps be
a minimal discomfort, on multi cores you shouldn’t notice it at all.

What cpu does your machine have?

Thanks,

Andre

I had a vaguely similar issue in the editor with v10.6 - the more I typed, the longer it would take for what I’d typed to display on the screen.

What resolved that for me (thanks Jeff and unknown-to-me developer!) was closing Toad, renaming my Toad v10.6 application data folder and then relaunching Toad (effectively starting off with a fresh new copy of the options etc). Something must have been hinky with my config(s).

Perhaps that might work for you? If it doesn’t, you could always rename your existing app data folder back to get your current settings back.

unknown-to-me developer

That would be Mike!

That would be Mike!

In which case, thanks very much Mike!

Be careful not to make some assumptions here – I have a dual core with
hyperthreading on my notebook – so effectively four logical cores – but my
anti-virus runs in background as well as my disk defrag and other utilities –
you cannot assume since I have N cores that you can steal one – they are
already spoken for for many users and so we need to consume our fair share

No assumptions. We should not steal cores, only idle time should be stolen. Idle
time is waste. We just steal waste. On a six core probably more idle time is
available than on a single core, so more background work can be done. This is
controlled by thread priorities. The challenge is to make sure the user
doesn’t notice it at all.

Toad might need tuning, let’s evaluate the user feedback. And in the meantime
I’m gonna dig up an old Pentium and test run Toad on it.

Hi Michael,

”Check syntax as you type” is disabled (It doesn’t make a lot
of difference if it is enabled or not)

After i stop typing the cpu goes to normal after 2 secs.

You are right that the thread is running on a low priority, and apparently it
doesn’t affects the typing.

I was just wondering what was the cause for the high cpu.

Let’s just leave it for now.

By the way. I run toad on a rather old 1.83 GHz dual core notebook

Thanks for your reply,

Best regards

Finn

Fra: toad@yahoogroups.com [mailto:toad@yahoogroups.com] På vegne af Michael
Staszewski
Sendt: 5. oktober 2011 15:30
Til: toad@yahoogroups.com
Emne: [toad] RE: High CPU editing large package

Does the CPU stop pegging when you stop typing? If so, approximately how long
after you stop typing does the CPU return to normal? If you have the option
Options|Editor|Code Assist|“Check syntax as you type” enabled disable it and try
again. Does that make a difference?

It seems that the hole package is scanned when a key is pressed

It is, but only after a delay. I believe the delay is 500ms. When you pause the
Editor parses the file so that the navigator remains up to date and so that any
other features requiring parser results can execute with minimal delay. This
process runs in a low priority background thread and aborts when you resume
typing. When your CPU is pegged is Toad unresponsive?

Michael


Talking about notebooks, we might think of limiting the amount of idle cpu time
stolen for background work. Some notebooks tend to turn into heat blowers,
taking up way more battery power, when their cores are heavily loaded for more
than a few seconds. In Toad cpu load would rather be high when, for instance,
repeatingly typing a character in a large package text and pausing for two or
three seconds after each character. When entering text in a usual way cpu usage
should be moderate though.