-
Notifications
You must be signed in to change notification settings - Fork 27
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
efficiency: investigate bottleneck #1614
Comments
IMO, the UI side of this issue is more concerning than the UIS side because UIS delay loads the server, whereas UI delay hits the user's browser. The bulk of the time is being taken in the data store processing the deltas, this should be the first target for improvement. Profiling required to highlight problem areas, given that the table view is only slightly faster to load than the tree view, family tree computation is unlikely to be the cause. |
Profiling Experiments1 - JS Profiling Profile the time it takes to load the tree view for the workflow in the OP with Results:
The remainder appears to be vuejs. 2 - View Load Time Open a view, then measure the time it takes to open the same view in a new workspace tab.
Manual timings to the nearest second:
3 - Component Loading Start with the "simple tree" view and add in the components used by the regular "tree" view one by one, measuring the impact on load time for each.
Using these timings to extract the cost per component:
Note: These costs are for 1'000 tasks, e.g 0.004s per Conclusions
Remediation:
|
* Reduce the overheads of `applyInheritance` for families with lots of children. * Use a map for O(1) lookup times when checking whether child nodes are present in the store. * This should change scaling from `O(mn)` to `O(n)` where `n` is the number of tasks in a family when created and `m` is the number of children after an update (n~=m for most cases). * Partially addresses cylc#1614 * For the reduced example (`hours = 20`) this reduces the time taken by ~85% from ~0.6s to <0.1s (though these times will be subject to much jitter).
The three optimisations up so far make a reasonable dent in the CPU time. The time is going into two places:
The data store time is more concerning than the view time as views can be optimised (e.g. table view reduces the number of nodes on screen by pagination, tree view can use a virtual scroller in the future to similar effect) but the data store time will always remain so the store should be the main target of optimisation. |
This workflow has proven to be remarkably difficult for the UIS & UI to handle:
For more information see: https://cylc.discourse.group/t/slow-load-of-cylc-workflows-disconnects/823/19
Investigation so far has confirmed:
This issue focuses on the UI side of things.
Suggested remediation (UI only, please update with new suggestions):
O(n^2)
routine from the data store reducing the cost of nodes with a high number of children.The text was updated successfully, but these errors were encountered: