CPU at 100% when loading saved scripts

[expired user #5706]'s profile image [expired user #5706] posted 13 years ago in Running SQL scripts Permalink
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.
ansgar's profile image ansgar posted 13 years ago Permalink
Probably because of its huge size? What encoding has it and which encoding did you select in the open dialog?
[expired user #5706]'s profile image [expired user #5706] posted 13 years ago Permalink
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%.
ansgar's profile image ansgar posted 13 years ago Permalink
Is the file loading completed or is the editor still empty and mouse cursor shows hourglass?
[expired user #5706]'s profile image [expired user #5706] posted 13 years ago Permalink
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.
ansgar's profile image ansgar posted 13 years ago Permalink
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.