SQL Prompt - lag in typed code appearing

Provides intelligent code completion for SQL Server editors.

Moderators: JonathanWatts, David Atkinson, Anu Deshpande, Paul Stephenson, Michelle Taylor, Mike Upton, justin.caldicott, Aaron Law

SQL Prompt - lag in typed code appearing

Postby USFRMerrill » Thu May 02, 2013 3:08 pm

As I type in the Query Window I am able to type 30 + character before the characters appear on the screen.
Version: 5.3.6.28 Professional Edition
Items tested
1. When the query is saved (does not matter if local to PC or network) the slowness appears
2. If "Disable Code Suggestion" is set then there is NOT a performance issue.
3. Red Gate log file reports the below error.
4. Checked for update. No new updates.
5. Query is only 134 lines

Error log
02 May 2013 13:37:24,329 [11] ERROR RedGate.SqlPrompt.Metadata.Options.OptionsBase - Couldn't read options on attempt 0
System.IO.IOException: The process cannot access the file 'C:\\Users\\rmerrill\\AppData\\Local\\Red Gate\\SQL Prompt 5\\RedGate_SqlPrompt_Engine_EngineOptions.xml' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks)
at RedGate.SqlPrompt.Metadata.Options.OptionsBase.(Type )
USFRMerrill
 
Posts: 2
Joined: Thu May 02, 2013 2:52 pm

Postby USFRMerrill » Thu May 02, 2013 3:14 pm

Scratch the original posted error message. That was due to attempting to increase this setting <ParserLookBackDistance>5000</ParserLookBackDistance>

This did not make a difference.
USFRMerrill
 
Posts: 2
Joined: Thu May 02, 2013 2:52 pm

Postby Anu Deshpande » Fri May 03, 2013 4:43 pm

Many thanks for your post and apologies for inconvenience caused.

If you wish to alter the behaviour of SQL Prompt where it does not suggest variables over large blocks of SQL or fails to provide help with large scripts, you can edit the RedGate_SQLPrompt_Engine_EngineOptions.xml file.

This file should be in the below location:

%USERPROFILE%\\AppData\\Local\\Red Gate\\SQL Prompt 5

The string in the file you need to edit is <ParserLookBackDistance>5000</ParserLookBackDistance><ParserLookAheadDistance>3000</ParserLookAheadDistance>

The figure detailed here is in bytes. You can decrease the look back distance as much as you like. However please be aware that increasing the value; depending on your hardware, there may be a considerable degradation in the performance of the tool.

Please let me know how you get on.
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Anu Deshpande
 
Posts: 692
Joined: Mon Apr 20, 2009 3:53 pm
Location: Cambridge


Return to SQL Prompt 5

Who is online

Users browsing this forum: No registered users and 0 guests