Hello, I just updated a Python script to work as a Prefect flow. I executed it locally and it works but it took ~25 minutes to run. However, if I execute the python script locally, without Prefect, it takes ~3 minutes. Why would this be the case?
m
Mason Menges
11/16/2022, 10:04 PM
Hey @Ashley Felber could you provide some more details about how you're flow is setup? i.e. which task runner are you using? Also simple example of your code could help clarify us clarify what might be happening. One more thing to note we are currently working on performance improvements to the Orion engine so any extra context you have is greatly appreciated 😄
a
Ashley Felber
11/17/2022, 2:29 AM
Hello. I did not specify a task runner so just using default settings.
I’m not sure how to provide a simple example of the code that would be helpful. I can explain what it’s doing though. It’s reading data events from this API, https://developer.clevertap.com/docs/get-events-api, for a specified date range. Today, I ran it for 1 date only. The API returns a pretty nested JSON. In the script that JSON is turned into a dataframe and appended to a snowflake table. The API will only return 5000 events at a time so there is a loop that continues until all events are retrieved.
Let me know if you would like to look at the actual code. Again, just not sure how to share a simple version of it, so if you can provide a bit more detail on exactly what you want there.
@Taylor Curran FYI this is another issue i’m having.