Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Can someone confirm data is passed to python by copy as opposed to reference?

Joshman108
8 - Asteroid

The incurred runtime from python tool (proportional to size of data being passed) seems to indicate this.

I'm not an expert, can someone tell me why it needs to be passed by copy anyway?

 

I have a workflow with 20million records. My tests confirm the python tool alone adds 8 minutes of runtime just passing data in and out of the tool without any calulcations. 

3 REPLIES 3
BrandonB
Alteryx
Alteryx

Have you also tried changing the Python tool from Interactive Mode to Production Mode before running? 

 

https://help.alteryx.com/current/designer/python-tool 

 

"Select the Production button. Use this mode for models in production. In this mode, Designer consolidates all Python cells from the Jupyter Notebook into a single, read only script. Designer passes that script to your Python interpreter.

When you run the workflow, Designer performs these tasks:

  • It bypasses the Jupyter shell, then runs the read-only script through a standard Python interpreter.
  • It doesn't display errors, warnings, or print statements.

To edit the Production mode script, select Interactive mode, then edit the cells in the Jupyter Notebook. After you complete your edits, select Production mode."

Joshman108
8 - Asteroid

I wasn't aware of that, thanks. It make absolutely 0 performance difference for me, my code is literally just:

 

Alteryx.read('#1')

Alteryx.write(df,1)

BrandonB
Alteryx
Alteryx

It was worth a shot although I think that will make more of a performance difference with a more comprehensive script. I'm not sure on the exact mechanism by which the Python reads the data into the tool but I believe it is loaded in and temporarily leveraged as a yxdb. Historically I believe that the data was read into the tool and temporarily stored as a sqlite file. 

Labels