[vtkusers] why vtkGetMacro fuction so slow

zhangzhijun zjzhang at ee.cuhk.edu.hk
Sun Oct 28 11:03:46 EST 2001


I use a vtkGetMacro fuction in my program, and I find
it's unbearable slow when the program is running,
this is the fuction I use:vtkGetMacro(Num, short);
and I use a for loop and do it like this

for ( i=0;i< this->GetNum();i++)
{
  ......................
}

for (i=0;i<512;i++)
{
 .................
}
and it's very slow , and if I replace the this->GetNum() with the true value
512,
it 's much more faster than before, is this all right? or what's the reason
for this and how
should I do to solve this.




More information about the vtkusers mailing list