-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Activities tab rest optimization #1389
Conversation
…uts from summary tab
@jcabrerizo this is effective but a few things seem wrong to me: (1) (2) The Where Workflow objects are stored as sensors it is trickier, as probably when listing sensors we normally don't usually want a huge amount of data back, but also we don't have the same context as elsewhere. I'm uncomfortable just removing any field named |
4aa87e9
to
87f1438
Compare
@ahgittin I didn't find a better way to move out the output without modifying so much the |
Some tweaks: * tidy name of methods and params - call it filterOutputFields instead of suppressOutput (to me, suppress hints at security) * expose the capability on the generic resolver (used for some sensors, below) * when doing the filter, don't bother if it's short/trivial, and if it's not a string include the type for info * change implementation of filter to run even if suppress secrets is false * (in UI, remove one redundant activities call) And some additional restrictions: * exclude detail from tasks when doing a recursive/children lookup * filter output fields in tasks when detail is excluded * filter output fields from children and recursive task requests by default * filter output fields for selected sensors (name starts with "internal") when doing a batch read of sensors (this affects the workflow cache which contains all output) Impact for a simple test is: * 3 med size workflows - call to list - reduced from 126kb to 2kb * recursive task call for the above - from 25k to 5k * sensor batch read - from 120k to 2k * details of 1 workflow - 42kb to access -> unchanged
@jcabrerizo You are right, this makes a huge difference, and I agree with you it's the correct balance where we do it. In fact I've extended it a bit, and tidied, in 2d6e8cd, as follows: Use this in a few more places:
And some tidying/tweaks:
I did a simple test by adding these lines to the
The impact is huge:
It doesn't address the huge size of persistence but I will add a section to the docs on workflow for that. |
It avoids to return the
task-summary
and theoutput
of each step inside a workflow.The automatic refresh of the view was pulling those, sometimes, huge objects few times per minute make the UI work slower than expected