Callback performance question

If I remove the highlighted code to main module, will performance improve?. Because every time user select ‘work_week’, it groups then filter work_week. I am thinking to move groupby outside, so that callback no need to groupby… everytime.

Please suggest.

Hello @parthib,

That would decrease the computing time, since it doesn’t look like that information would change based upon input.

Any time you can save some computing power, you really should. :grin:

1 Like

Hi Jinnyzor,

So should I keep my code as it is?. or move to main ?.

Thanks,

Move it into “main”, whatever this is.

But if your DataFrame is small, the gains are not going to be huge, I guess.

1 Like

I am connecting to Snowflake DWH. Currently data frame is under 50000 records… expecting to reach 1 million records. in next 6 months… so moving to “main” will improve performance of call back?

1 Like