Question about Perl Script Job

Dear all,
My material studio edition is material studio 2017. When I use the forcite module to do MD simulation in my computer, the speed of my computer is about 1300 steps per minute. But when I add an external force into my system bu perl script, the compute speed slowed a lot to about 20 steps per minute. Why the compute speed slowed so much? Thanks.
Here are my perl script:

#!perl

use strict;
use Math::Trig;
use MaterialsScript qw(:all);

my \$doc = \$Documents{"MFI5aftergeomopt.xsd"};
my \$totalTime1 = 1200; # ps



my \$interval = 120; #ps


my \$forceAmplitude = 339; # kcal/mol/A

my \$forcite = Modules->Forcite;
my \$dynamics = \$forcite->Dynamics;

    
my \$xtd = \$dynamics->Run(\$doc, Settings(NumberOfSteps => 1))->Trajectory;

Modules->Forcite->ChangeSettings(Settings(
    TrajectoryRestart => "Yes", 
    AppendTrajectory => "Yes"));

for(my \$time1 = 0; \$time1 < \$totalTime1; \$time1 += \$interval)
{
    my \$force1 = \$forceAmplitude*(\$time1/\$totalTime1);
    printf("%12.6f %12.6f\n", \$time1, \$force1);
    
    my \$externalForceStrength = \$force1;
    
    my \$results = \$dynamics->Run(\$xtd, Settings(
    Ensemble3D => "NVT",
Temperature => 348, 
TimeStep=> 2, 
EnergyDeviation=> 5000000,
 NumberOfSteps=>60000,
 TrajectoryFrequency=>60000,
 Thermostat=>"Berendsen",
 CurrentForcefield=>"Dreiding",
 Quality=>"Coarse",
 ChargeAssignment=>"Use current",
        
    
    ExternalForceSet => "Top",  
        ExternalForceStrength => \$externalForceStrength, 
    ExternalForceX=>0.0649,
    ExternalForceY=>-1,
        ExternalForceZ=>0,
        CounterExternalForce=> "No"
    ));
}

The more strange thing is that it happens in sometimes, sometimes when I use the same perl script, the compute speed will not slowed down. What's the reason about it? What's wrong with my computer or this script? Thanks.
Best regards.
Yours
CHENG Xu