distal-attribute
distal-attribute
distal-attribute
distal-attribute

CPU at 100% when loading saved scripts

User, date Message
Written by rhyfelwr
3 years ago
Category: Running SQL scripts
3 posts since Mon, 16 May 11
Issue seems to be when loading a saved script. I have a script that I run frequently, but if I leave the saved script open in the HeidiSQL window, very soon the CPU usage goes to 100%.

I have opened the script in another text editor and pasted it into a new query window, with no issues. It only happens when the program is reading the script from a saved file.
Written by ansgar
3 years ago
4940 posts since Fri, 07 Apr 06
Probably because of its huge size? What encoding has it and which encoding did you select in the open dialog?
Written by rhyfelwr
3 years ago
3 posts since Mon, 16 May 11
The file is 4,317 characters, and is ANSI encoded. When opening the script I had been letting it auto detect, however I have now tried it using ANSI encoding, and rather than using 100% it's now sitting at 50% constantly. When I close the loaded script, usage goes back down to 0%.
Written by ansgar
3 years ago
4940 posts since Fri, 07 Apr 06
Is the file loading completed or is the editor still empty and mouse cursor shows hourglass?
Written by rhyfelwr
3 years ago
3 posts since Mon, 16 May 11
The file loads completely, and the SQL runs, I get a result, all looks OK. The CPU hits 50% or higher just after the file loads, and stays there until I close the file regardless of whether the program is running some SQL, exporting the results or just sitting there doing nothing ;)

This is also not an isolated issue, my colleague is getting the same issue when using the same scripts (though not at the same time) in HeidiSQL on her PC. Again, if she types or pastes the SQL into a query window it doesn't use excessive CPU. But if she saves the script, and loads the script from a saved file, the CPU usage jumps up again.
Written by ansgar
3 years ago
4940 posts since Fri, 07 Apr 06
Can you send me that file in question, so I can reproduce that here? Anyway what I do - I can't reproduce it.
 

Please login to leave a reply, or register at first.