Search - User list
Full Version: python processor vs. python script - execution time
Root » PDG/TOPs » python processor vs. python script - execution time
fabriciochamon
Hi,

I have this big material node, that was saved with “node.asCode()”.
Now I want to reload it using “execfile()”.

The file has 60k+ lines, but it loads in a matter of seconds when I run inside a python script node. On the other hand it takes about 2 minutes to load when running inside a python processor node.

For this specific task I'd need to run inside a processor, since the file loading is tied to workitem generation.

What could be the cause for such a big difference in the execution times ?

thanks.
EricSheng
As far as I understand, the Python Script node is just the onCookTask callback in the Python Processor node. You can set the file path onGenerate(set isInprocess=True inProcess=True to perform an in-process cook) and load it onCookTask.
fabriciochamon
Eric, that's exactly what I need. thanks a lot for the reply!
A small correction: the argument name is “inProcess” and not “isInProcess”, for anybody else reading it.

thanks.
EricSheng
fabriciochamon
Eric, that's exactly what I need. thanks a lot for the reply!
A small correction: the argument name is “inProcess” and not “isInProcess”, for anybody else reading it.

thanks.
Thank you for the correction, I've edited the answer for convenient.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB