Start a new topic

SQL Editor -- slow key response when typing

[This topic is migrated from our old forums. The original author name has been removed]

Hi. Typing in the new editor seems slow, you can see and feel the delay as characters get slowly displayed. This most becomes frustrating when I use Backspace to delete a bunch of chars on a line... Also, just to test, i pressed and held a key. As keystrokes were shown in the editor, the Task Manager was displaying a 24% CPU utillization for the dbvis PID There is no configuration for 'keystroke' delay, is there? Anyone else seeing this? Product: DbVisualizer Personal 8.0 Build: #1689 (2011/06/16 12:10) Java VM: Java HotSpot(TM) Client VM Java Version: 1.6.0_24 Java Vendor: Sun Microsystems Inc. OS Name: Windows XP OS Arch: x86 OS Version: 5.1

[This reply is migrated from our old forums. The original author name has been removed]

Re: SQL Editor -- slow key response when typing
Hi Hans Yes, the user preferences directory is on a network drive. I have a lot of history there, as well. I'm sure that's part of the startup slowness, but doesn't satisfy me regarding why there is general slowness and intermittent freezing. To tell you the truth, I'm actually noticing that the buffering of keystrokes isn't as bad now as the freeze/lag of the interface. I can't pin down any particular thing I'm doing that initiates the behavior. If I scroll the editor, if I open a file, if I make an edit then try to execute (either by keyboard or toolbar button) it lags momentarily then resumes. I'm stumped. Ray
[This reply is migrated from our old forums.]

Re: SQL Editor -- slow key response when typing
Hi Ray, Please disable the Auto Save feature just to see if that is what is causing this. You do so by setting the special property named dbvis.-AutoSaverRunInterval to 0. Please see thus Users Guide for how to set the special property: http://confluence.dbvis.com/display/UG91/Special+Properties Note! Make sure you remove the leading hashmark on the line for the property. Enable debugging for DbVisualizer in Tools->Debug WIndow and then restart DbVisualizer. You should see a message saying that Auto Saving was not started. If disabling Auto Save solves the problem, we at least know what is causing this. You can then minimize the problem by setting the property to a longer interval, e.g. 120 seconds or even longer. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: SQL Editor -- slow key response when typing
Hi Hans Good news! Turning off AutoSave seems to have remedied the issue. It's so much better now. What I didn't do was to reset the value as you suggested to a longer interval - currently it's disabled. Since I'm not entirely clear what is being "saved" by AutoSave, can you tell me the consequence of not turning it back on? Many thanks! Ray
[This reply is migrated from our old forums.]

Re: SQL Editor -- slow key response when typing
Hi Ray, Auto Save saves the content of all open SQL Commander tabs at the specified interval, so that you do not lose any edits if DbVisualizer would crash or if you exit without saving. I suggest that you enable it again but with a longer interval. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: SQL Editor -- slow key response when typing
Hi Hans, So just to be really clear, it sounds like you're saying with AutoSave off DBVis won't save the tabs on exit if I don't manually save them? Thanks Ray
[This reply is migrated from our old forums.]

Re: SQL Editor -- slow key response when typing
Ray, The auto saver runs in the background and periodically save the content of the SQL editor tabs. If you exit the normal way the files are then also preserved. If the auto saver is turned off then your files will be gone only if DbVisualizer is abruptly terminated. A few questions regarding the original problem: 1) Having the auto saver turned on and all SQL editor tabs closed, do you then experience the slow UI? 2) Having the auto saver turned on and a single SQL editor open with just a few rows of data, do you then experience the slow UI? 3) Does the degree of slowness relate to the number of open SQL editors and the size of these? Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: SQL Editor -- slow key response when typing
Hi Roger Thanks for the clarification. To your questions 1. I understand why you're asking the question, but it's not something I'd ever do naturally. Once I take out the hammer I tend to start hitting nails with it. Unfortunately, I don't have access to change files on my C: drive - our IS department has the machines locked down so I'd have to get someone to even test this for me. If you guys wanted to move some of this functionality away from those config / pref files and put them in the interface somewhere it would help, but that's up to you, of course. 2. I don't think it's the case. Auto saver is currently turned on with a 5-minute interval. This has helped tremendously. Though it's still pretty apparent when the saving is happening, at least I can do work in between. 3. I wish I could answer this question (and the others) a litle better. I will tell you that from my experience it's not the case. The slowness could happen just scrolling the text of the query with no results at all. It could happen just typing some statements with or without any results int he grid or it could happen scrolling the results of the grid. Not sure if you read the entire thread or not, but I used to have a desktop PC here (off-site) with a RAP device instead of a laptop with a VPN connection. When I was using that previous setup, I had no such issues - it was just like being physically located in the office and I never experienced any issues at all. As a corollary, and I was going to search the forums or start a new question, the SQL History has almost the same issue. When I'm off-site I can click the button to see my history and it will take almost forever to load. Everything stops until that history window comes up (meaning the GUI freezes). I was at the office yesterday (using this same machine on a docking station) and I was able to get the History window up in a short time. Now I've been waiting over 10 minutes and it's still not up. Ray
[This reply is migrated from our old forums.]

Re: SQL Editor -- slow key response when typing
Hi Ray, Sorry for the delay and thanks for the additional details. To best pinpoint where the hang occur it would be great if you can rewind the default auto saver period to 30 seconds and then while DbVisualizer is hanging run the jstack command. This command is unfortunately only available in the Java Development Kit (JDK) and not Java Runtime Environment (JRE). If you don't have the JDK 1.7 version installed download it here: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html Once installed you need to open a DOS shell and navigate to the installation folder for the JDK and its bin folder. Now start DbVisualizer and wait until it is unresponsive. In the DOS shell run: jps It will show a list of Java processes on the machine. Now run: jstack Replace with the process id for the "Program" entry listed with jsp. A dump of the Java VM is now listed in the shell. Post that dump in a reply to this post. It would be great if you can help us with the above as it will give more details where there hang is occurring. Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: SQL Editor -- slow key response when typing
Hi Roger Thanks for that great suggestion. I really don't have all that access, though. These machines are pretty locked down and our IS department would probably request a business case document to even install the JDK (and would likely reject the request). Sorry. As it stands, I have had our site support person set the AutoSave to 10 minutes now. I found that has really helped to reduce the hang and allows me to do my work. Others in my goup who also use DBVis have done the same and report similar results. The other (related?) issue I mentioned regarding the history taking so long to load turns out to not be such an issue. I had set the maximum entries to a really high number which I've now reduced to something like 5,000. What's worse is I tried to archive some of the history items by creating an archive folder for last year's stuff and I zipped the older items. (Yeah, I know you're probably shaking your head). Apparently DBVis was reading all those items (there were quite a few). So I got rid of the zip file and the archive folder and it seems to have helped. Now, instead of taking literally 20 minutes or more it opens in 3 minutes. So that's that. I can now use DBVis and with a little patience I can review my history so I will say thanks to you and Hans and consider this issue solved. Regards Ray
[This reply is migrated from our old forums. The original author name has been removed]

Re: SQL Editor -- slow key response when typing
Must add ---- selecting text with a mouse also seems visually delayed...
[This reply is migrated from our old forums. The original author name has been removed]

Re: SQL Editor -- slow key response when typing
No one else has noticed this behavior? My desktop is an Intel Xeon dual CPU @ 2ghz w/ 4g of ram
[This reply is migrated from our old forums.]

Re: SQL Editor -- slow key response when typing
Hi Alex, We have not experienced what you describe, nor have we heard about this problem from someone else. Is the script you edit extremely large? Have you tested editing the same script with DbVisualizer installed on some other computer? Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: SQL Editor -- slow key response when typing
Hans, When the dbVis is loaded at first, the editing is OK. As i open more tabs and as the day goes by, it becomes impossible to work... The DEL and Backspace take about 1-2 seconds to respond.. Right now I have 8 tabs open, only 3 of them have about 300 lines of code. I only experience this issue in those tabs. When i go to the tabs that have 10 lines of code, editing is OK. .... When i go back to the tab with more lines and hit a key, it shows CPU usage jump by 25%.... dbvis-multi.exe has allocated almost 700K of VM.... I am thinking of going back to the old ver.... just to compare, I copied and pasted the same code into Toad just to check. the problem was not observed. Key strokes are reacted to immediately ...
[This reply is migrated from our old forums.]

Re: SQL Editor -- slow key response when typing
Alex, What is the memory meter in Tools->Debug Window sating when the editor is getting slow? Regards Roger