mel runs slowly in maya 2022

mel runs slowly in maya 2022

1006138663
Advocate Advocate
370 Views
2 Replies
Message 1 of 3

mel runs slowly in maya 2022

1006138663
Advocate
Advocate

I tested the same Mel code in maya2018 and maya2022 respectively. The calculation speed of maya2022 is very slow. I don't know why.  In addition, I have tested many mathematical operations, and the speed of maya2022 is slower than that of maya2018

maya2018 VS maya2022.png

0 Likes
Accepted solutions (1)
371 Views
2 Replies
Replies (2)
Message 2 of 3

1006138663
Advocate
Advocate

float $startTime = `timerX`;

vector $a = <<2.783479,2.783479,2.783479>>;
vector $b = <<3.783479,2.783479,1.783479>>;
for($i=0; $i<10000000; $i++)
{
float $dis = mag($a - $b) ;
}

float $endTime = `timerX`;
print ("useTime "+($endTime-$startTime)+"s") ;

0 Likes
Message 3 of 3

1006138663
Advocate
Advocate
Accepted solution

If this is a bug, I really beg to fix it, because there is the same problem in maya2023, which makes me very frustrated. This problem will make Mel unable to develop some simple functions.