Replies: 1 comment 2 replies
-
It depends: Does the data change? Then you should fetch it regularly (e.g. using |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey all,
I want to have a ui page defined in separated python file, and before the page get rendered fetch some data e.g. result from parse big txt file which could be cpu bound operation. I am wondering where is the best place to fetch the data. Some pseudocode to describe the scenario:
option 1: fetch data before @ui.page decorated function and use data inside the function
option2: fetch data inside the @ui.page decorated function
Question:
which option is better and why? or the two options are not properly, there is another better way to do?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions