# Editor Window Hangs when edit SQL script

**URL:** <https://forums.toadworld.com/t/editor-window-hangs-when-edit-sql-script/39477>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [May 17, 2017, 6:01am UTC](https://forums.toadworld.com/t/editor-window-hangs-when-edit-sql-script/39477 "2017-05-17T06:01:20Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![gary.lynch](https://avatars.discourse-cdn.com/v4/letter/g/ebca7d/32.png) [@gary.lynch](https://forums.toadworld.com/u/gary.lynch)\
**Post date:** [May 17, 2017, 6:01am UTC](https://forums.toadworld.com/t/editor-window-hangs-when-edit-sql-script/39477/1 "2017-05-17T06:01:20Z")

</div>

I assume this is an option setting that I have not set correctly… But I can’t find it…

I have a large SQL file (~35,000 lines) that basically has my “SQL History” in it so I can find stuff I have done before and copy it for new stuff… I always open this file on TOAD startup.

I have one machine with 12.6.0.53 installed and it works just fine (and has for many years).

I have a new machine with 12.10.0.30 installed and it behaves differently. Opening the file is fine. The first execution of any query in the file takes over a minute (I ran the SQL Tracker and the only SQL is the actual select I am running and the query itself only takes msecs to return). After that all queries in the file will run in the expected amount of time until you make ANY edits to the file. Then the delay occurs again. I can add a space on an empty line and it hangs.

It is as if it is parsing the entire file, but I can’t figure out how to stop it.

Anybody got any suggestions?

---

<div class="post-metadata">

**Author:** ![mstaszew](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/mstaszew/32/23_2.png) [@mstaszew](https://forums.toadworld.com/u/mstaszew)\
**Post date:** [May 17, 2017, 6:10am UTC](https://forums.toadworld.com/t/editor-window-hangs-when-edit-sql-script/39477/2 "2017-05-17T06:10:42Z")

</div>

It sounds like it’s waiting on a parse. When you make edits any existing parser results are invalidated. Parsing occurs in a background thread, but if you try to do something requiring a parse like execute then Toad will wait for parser data. 12.6 would attempt to parse only that text affected by an edit. This worked well enough, but was not without bugs and there was quite a bit of code fired on each keystroke to accommodate. 12.10 does a full parse for guaranteed accuracy and faster text editing, but quick edit/execute cycles are going to be slower than before, especially with larger text.

Michael

---

<div class="post-metadata">

**Author:** ![mstaszew](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/mstaszew/32/23_2.png) [@mstaszew](https://forums.toadworld.com/u/mstaszew)\
**Post date:** [May 17, 2017, 6:14am UTC](https://forums.toadworld.com/t/editor-window-hangs-when-edit-sql-script/39477/3 "2017-05-17T06:14:08Z")

</div>

I just had a thought just after sending that might work, but it’s too late for 12.11. We should be able to do a shallow parse and get just the statement at caret when parser data is invalid to eliminate the full parse wait time. That would be a hybrid of 12.6/12.10 behavior that should provide the best of both methods. I will log to look at following 12.11 release.

Michael

---

<div class="post-metadata">

**Author:** ![gary.lynch](https://avatars.discourse-cdn.com/v4/letter/g/ebca7d/32.png) [@gary.lynch](https://forums.toadworld.com/u/gary.lynch)\
**Post date:** [May 17, 2017, 8:24am UTC](https://forums.toadworld.com/t/editor-window-hangs-when-edit-sql-script/39477/4 "2017-05-17T08:24:27Z")

</div>

Thanks for explaining. That all makes sense.

---

<div class="post-metadata">

**Author:** ![gary.lynch](https://avatars.discourse-cdn.com/v4/letter/g/ebca7d/32.png) [@gary.lynch](https://forums.toadworld.com/u/gary.lynch)\
**Post date:** [May 15, 2018, 5:45am UTC](https://forums.toadworld.com/t/editor-window-hangs-when-edit-sql-script/39477/5 "2018-05-15T05:45:49Z")

</div>

Hi Michael,

I just downloaded and am starting to use v 13.

It seems to have this same issue. Any idea if your idea above made it into any plans for a future release?

I’m heading back to 12.6 again.

---

<div class="post-metadata">

**Author:** ![michael.lapointe](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@michael.lapointe](https://forums.toadworld.com/u/michael.lapointe)\
**Post date:** [May 15, 2018, 6:02am UTC](https://forums.toadworld.com/t/editor-window-hangs-when-edit-sql-script/39477/6 "2018-05-15T06:02:22Z")

</div>

I was told it was a bug, and will be fixed in a patch release soon.

Michael LaPointe

TD Bank AMCB | USTS Information Management

IT Solutions Design Specialist, Data Intergration

6 Atlantis Way

Lewiston, Me.

M: 207-330-5127

Email: [michael.lapointe@td.com](mailto:michael.lapointe@td.com)

**From:** gary.lynch [[mailto:bounce-garylynch@toadworld.com](mailto:bounce-garylynch@toadworld.com)]

**Sent:** Tuesday, May 15, 2018 8:47 AM

**To:** [toadoracle@toadworld.com](mailto:toadoracle@toadworld.com)

**Subject:** RE: [Toad for Oracle - Discussion Forum] Editor Window Hangs when edit SQL script

**[RE: Editor Window Hangs when edit SQL script](https://clicktime.symantec.com/a/1/THocbUsNJkR1JZH23RheUDAH9m0JH5TMKHeRjJIF-2U=?d=-r-Ac4K_OORquNAG4Vr39wJ9UlRQRm_FzfcBGoTFmwfujc72-9b0G85hA6_FvhVEmxOkDC9af0qSpUEztb4q-qdPZfK7yo3QOVI8Yh3vK5XsfcxbgfjZFYCVopwWcCCpFFtlqWuVDl7tTQbZIJoT-72J2GeVRWrFDSo_EmP6EwKbckMFr03tWxy5RstDRghLiXbRpOxbbwdHR8n4H61wMAdW8oPIgXWJoEkv_CufKcEa83I_X5EPq8F-JJ34Xwz1cjn9274S1HlqJZhhHa5-M_JhD5Tsf5DyDpogwMSl6BvzUVOBO45PP6YUsISX2f_xwb5tnitHH5d2KwVfoaTt9Rr9mc4PdQoTGkG3VXokw26vvtbmP3xGrvWBqMIopGzGMP8_SIpjF15TKJhSrIgxw8zIlGahyrTGm5ezzOua7ckt_wvRE-XjINVFAeTjfJFTzvQ_OWzIY2ylIor-RA%3D%3D&u=https%3A%2F%2Fcommunity.toadworld.com%2Fproducts%2Ftoad-for-oracle%2Ff%2F10%2Fp%2F32584%2F70528%2370528)**

Reply by gary.lynch

Hi Michael,

I just downloaded and am starting to use v 13.

It seems to have this same issue. Any idea if your idea above made it into any plans for a future release?

I’m heading back to 12.6 again.

To reply, please reply-all to this email.

[Stop receiving emails](https://clicktime.symantec.com/a/1/jMtreJD1e9_VJJhcwiqSBevO2XRT1cY05WsXQH2YreA=?d=-r-Ac4K_OORquNAG4Vr39wJ9UlRQRm_FzfcBGoTFmwfujc72-9b0G85hA6_FvhVEmxOkDC9af0qSpUEztb4q-qdPZfK7yo3QOVI8Yh3vK5XsfcxbgfjZFYCVopwWcCCpFFtlqWuVDl7tTQbZIJoT-72J2GeVRWrFDSo_EmP6EwKbckMFr03tWxy5RstDRghLiXbRpOxbbwdHR8n4H61wMAdW8oPIgXWJoEkv_CufKcEa83I_X5EPq8F-JJ34Xwz1cjn9274S1HlqJZhhHa5-M_JhD5Tsf5DyDpogwMSl6BvzUVOBO45PP6YUsISX2f_xwb5tnitHH5d2KwVfoaTt9Rr9mc4PdQoTGkG3VXokw26vvtbmP3xGrvWBqMIopGzGMP8_SIpjF15TKJhSrIgxw8zIlGahyrTGm5ezzOua7ckt_wvRE-XjINVFAeTjfJFTzvQ_OWzIY2ylIor-RA%3D%3D&u=https%3A%2F%2Fcommunity.toadworld.com%2Fproducts%2Ftoad-for-oracle%2Ff%2F10%2Ft%2F32584%3Fsubscribe%3Dfalse) on this subject.

Or [  
Unsubscribe from Toad for Oracle Forum](https://clicktime.symantec.com/a/1/o6r1kOd6pxRjAt4zQLzvKmZ_6wwlhYJWRbrUznNP5uI=?d=-r-Ac4K_OORquNAG4Vr39wJ9UlRQRm_FzfcBGoTFmwfujc72-9b0G85hA6_FvhVEmxOkDC9af0qSpUEztb4q-qdPZfK7yo3QOVI8Yh3vK5XsfcxbgfjZFYCVopwWcCCpFFtlqWuVDl7tTQbZIJoT-72J2GeVRWrFDSo_EmP6EwKbckMFr03tWxy5RstDRghLiXbRpOxbbwdHR8n4H61wMAdW8oPIgXWJoEkv_CufKcEa83I_X5EPq8F-JJ34Xwz1cjn9274S1HlqJZhhHa5-M_JhD5Tsf5DyDpogwMSl6BvzUVOBO45PP6YUsISX2f_xwb5tnitHH5d2KwVfoaTt9Rr9mc4PdQoTGkG3VXokw26vvtbmP3xGrvWBqMIopGzGMP8_SIpjF15TKJhSrIgxw8zIlGahyrTGm5ezzOua7ckt_wvRE-XjINVFAeTjfJFTzvQ_OWzIY2ylIor-RA%3D%3D&u=https%3A%2F%2Fcommunity.toadworld.com%2Fproducts%2Ftoad-for-oracle%2Ff%2F10%3Fsubscribe%3Dfalse) notifications altogether.

Toad for Oracle - Discussion Forum

[Flag](https://clicktime.symantec.com/a/1/J-xdni4ZGbzxuXTFRlFx0ayX9NYMthJIw3toVwmr5Ek=?d=-r-Ac4K_OORquNAG4Vr39wJ9UlRQRm_FzfcBGoTFmwfujc72-9b0G85hA6_FvhVEmxOkDC9af0qSpUEztb4q-qdPZfK7yo3QOVI8Yh3vK5XsfcxbgfjZFYCVopwWcCCpFFtlqWuVDl7tTQbZIJoT-72J2GeVRWrFDSo_EmP6EwKbckMFr03tWxy5RstDRghLiXbRpOxbbwdHR8n4H61wMAdW8oPIgXWJoEkv_CufKcEa83I_X5EPq8F-JJ34Xwz1cjn9274S1HlqJZhhHa5-M_JhD5Tsf5DyDpogwMSl6BvzUVOBO45PP6YUsISX2f_xwb5tnitHH5d2KwVfoaTt9Rr9mc4PdQoTGkG3VXokw26vvtbmP3xGrvWBqMIopGzGMP8_SIpjF15TKJhSrIgxw8zIlGahyrTGm5ezzOua7ckt_wvRE-XjINVFAeTjfJFTzvQ_OWzIY2ylIor-RA%3D%3D&u=https%3A%2F%2Fcommunity.toadworld.com%2Fproducts%2Ftoad-for-oracle%2Ff%2F10%2Fp%2F32584%2F70528%3FAbuseContentId%3D570d6736-f303-4046-bbab-b9feec319264%26AbuseContentTypeId%3Df586769b-0822-468a-b7f3-a94d480ed9b0%26AbuseFlag%3Dtrue)  
this post as spam/abuse.

This message and any attachments may contain confidential or privileged

information and are intended only for the use of the intended recipients

of this message. If you are not the intended recipient of this message,

please notify the sender by return email, and delete this and all copies

of this message and any attachments from your system. Any unauthorized

disclosure, use, distribution, or reproduction of this message or any attachments is prohibited and may be unlawful.

---

<div class="post-metadata">

**Author:** ![mstaszew](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/mstaszew/32/23_2.png) [@mstaszew](https://forums.toadworld.com/u/mstaszew)\
**Post date:** [May 15, 2018, 7:37am UTC](https://forums.toadworld.com/t/editor-window-hangs-when-edit-sql-script/39477/7 "2018-05-15T07:37:16Z")

</div>

> It seems to have this same issue. Any idea if your idea above made it into any plans for a future release?

My apologies, Gary. I've not invested the time into this. It's not a trivial change, but it is a necessary one. I've elevated the priority on the logged issue so hopefully it will be more visible to me, now.

> I was told it was a bug

I would call it a "chore" in desperate need of attention! The code does function as intended, it just performs poorly with large packages and needs optimization.

Michael

---

<div class="post-metadata">

**Author:** ![gary.lynch](https://avatars.discourse-cdn.com/v4/letter/g/ebca7d/32.png) [@gary.lynch](https://forums.toadworld.com/u/gary.lynch)\
**Post date:** [June 19, 2018, 9:07am UTC](https://forums.toadworld.com/t/editor-window-hangs-when-edit-sql-script/39477/8 "2018-06-19T09:07:19Z")

</div>

Does the issue have an issue ID (TOR number)?

That way I could look at release notes for each release to see if it has been addressed without bothering you.

This is the section in release notes I am referring to:

Issue ID Link (If from Forums) Resolved Issue

TOR-435 Session browser resets filters, they don’t stay set.

---

<div class="post-metadata">

**Author:** ![mstaszew](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/mstaszew/32/23_2.png) [@mstaszew](https://forums.toadworld.com/u/mstaszew)\
**Post date:** [June 19, 2018, 9:22am UTC](https://forums.toadworld.com/t/editor-window-hangs-when-edit-sql-script/39477/9 "2018-06-19T09:22:02Z")

</div>

It does (TOR-1690) but our bug tracking system is internal only. I don’t know why we put those in the release notes.

Michael

---

<div class="post-metadata">

**Author:** ![mstaszew](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/mstaszew/32/23_2.png) [@mstaszew](https://forums.toadworld.com/u/mstaszew)\
**Post date:** [June 19, 2018, 3:06pm UTC](https://forums.toadworld.com/t/editor-window-hangs-when-edit-sql-script/39477/10 "2018-06-19T15:06:46Z")

</div>

You can disable the “Check rules as you type” option on the Code Analysis|General page in Options and see if that makes a difference. I have an 18,000+ line package and with that option enabled I’m looking at ~42 secs for Toad to fully dissect it. With the CA rules as you type disabled it’s down to 9 secs. Still not fast enough, but perhaps something you can do in the meantime.

---

<div class="post-metadata">

**Author:** ![avergison](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/avergison/32/66_2.png) [@avergison](https://forums.toadworld.com/u/avergison)\
**Post date:** [June 20, 2018, 9:19am UTC](https://forums.toadworld.com/t/editor-window-hangs-when-edit-sql-script/39477/11 "2018-06-20T09:19:51Z")

</div>

With Toad 12.12.0.39 I played with a 35,000 line file with on each line the following text: select x, y, z from mytab, histab;

Editing goes fluently with “Check rules as you type” switched off.

When switched on then editing still goes fluently unless you wait for a second or five, then Toad doesn’t listen anymore for a few seconds, may even show a spinning wait wheel and/or freeze window, then comes back to life and shows Code Analysis results and catches up with your pending keystrokes, although if you type ahead many keystrokes (say 10+) then the last ones can get lost. In any case Code Analysis results (squiggles) show up no later than 15 seconds.

When I double the content to 70,000 lines then the 15 seconds goes up to 55.

Gary, would it be possible to repeat this test w/ 35,000 lines your side and compare results?

Thanks,  
Andre (parser team)

---

<div class="post-metadata">

**Author:** ![mstaszew](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/mstaszew/32/23_2.png) [@mstaszew](https://forums.toadworld.com/u/mstaszew)\
**Post date:** [June 23, 2018, 9:45am UTC](https://forums.toadworld.com/t/editor-window-hangs-when-edit-sql-script/39477/12 "2018-06-23T09:45:19Z")

</div>

The first step is complete for next beta (13.1.0.21) which should be available Monday. For normal (F9) execution statement detection should be much faster. I have a sample text of 20k select statements and after text modification pre-execute processing takes ~1 second. It’s all done in the background so if you made an edit and left it alone for a second it would be instant. Similarly a 20K CREATE PROCEDURE sample takes ~3 seconds to process. The time taken to process is affected by how many statements are upstream from the one you are executing. If you are very near the beginning the processing time is almost nothing regardless of how many statements exist.

Execute Snippet (Ctrl+Enter/Shift+F9) and execute selection still require additional work that I hope to complete in the upcoming days.

Michael
