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.
- Blake_Bryce8 years agoOccasional Contributor
I did open a ticket - they got back to me saying they were able to replicate the issue and forwarded it to dev.
- tristaanogre8 years agoEsteemed Contributor
Yep... that means that someone things it's a legit problem and needs to confer with the developers to determine potential solutions, either as a patch or in some sort of suggestion for different code.
In my experience, usually you'll get something back by the next business day. At least they acknowledge that you've run across something problematic and that it needs some sort of corrective action.- Blake_Bryce8 years agoOccasional Contributor
F.$get("AtEndOfStream"), F.$call(“ReadLine)
This was the solution to the performance issue. Has to do with native COM object support in Jscipt but not in JavaScript
Related Content
- 12 months ago
Recent Discussions
- 3 days ago
- 4 days ago