Forum Discussion
I have tried using both methods - aqFile and the above. The performance is atrocious.
Here is our Jscript code -
var pathToTXT = ProjectSuite.Variables.FCINSTALLPATH+"\\Setup\\__createdb.log";
var logMethod = "Warning";
if(!aqFile.Exists(pathToTXT))
{
Log.Error(pathToTXT+" does not exist.");
return;
}
else
var openTXT = aqFile.OpenTextFile(pathToTXT, aqFile.faReadWrite, aqFile.ctANSI); //open createdb text file
var lineToBeRead;
var compare;
var secureRole;
var counter = 0;
openTXT.Cursor = 0;
while(!openTXT.IsEndOfFile())
{
lineToBeRead = openTXT.ReadLine();
compare = lineToBeRead.search("ORA-");
if(compare > -1)
{
secureRole = lineToBeRead.search("28405");
if(secureRole == -1) //This will ignore thie specific errror
{
if(logMethod == "Errors" || logMethod == "errors")
Log.Error("Line " + counter +": " + lineToBeRead);
if(logMethod == "Warnings" || logMethod == "warnings")
Log.Warning("Line " + counter +": " + lineToBeRead);
}
else
{
Log.Message("Line " + counter +": " + lineToBeRead);
}
}
counter++;
}
openTXT.Close();
Hrm.... yep, looks pretty much like the same code so, technically speaking, there's nothing code-wise that would account for the performance hit.
This seems to be a problem with the TC engine. Just to check, there has been no other environment changes between the two versions of the code? I'm assuming that the conversion is due to you changing from TC 11 to TC 12. Are you running on the same machine as you were before? There are no other processes running on the machine that could impact JavaScript performance?
If all this stuff checks out... best thing I can suggest is to open a support ticket with the SmartBear folks.