Skip to content
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

Task scheduler for internal operations #291

Open
realies opened this issue Mar 12, 2018 · 6 comments
Open

Task scheduler for internal operations #291

realies opened this issue Mar 12, 2018 · 6 comments

Comments

@realies
Copy link
Contributor

realies commented Mar 12, 2018

Certain back-end operations take up significant time to execute which affects user experience (reference: #290 (comment)).

Perhaps there can to be an internal task scheduler for certain operations that happen without the user requesting them during page load time? That way webGui could consume recent updates instead of being the initiator for their generation.

@bergware
Copy link
Contributor

Caching mechanism in Docker container list information was broken, fixed in 6.5.1. On my system that cuts loading time in half (e.g. Dashboard takes 220ms to load 10 containers + 3 VMs)

@realies
Copy link
Contributor Author

realies commented Mar 20, 2018

@bergware, when $display is set to docker at https://github.com/limetech/webgui/blob/a3fe701dfe0c44969f0fbc67594d47be6fbcc081/plugins/dynamix/include/DashboardApps.php#L20
still takes about ~1500ms to load the script when there is 32 container instances.

@bergware
Copy link
Contributor

These are my test results for complete loading + rendering of containers in Dashboard:

10 containers = 205 ms
20 containers = 562 ms
30 containers = 788 ms
40 containers = 1074 ms

@realies
Copy link
Contributor Author

realies commented Mar 20, 2018

1000+ms seems like an unreasonable amount of time. Portainer takes 80-100ms for 33 containers.

@bergware
Copy link
Contributor

You can not expect a interpreted PHP script to perform at the same level as a compiled binary executable.

Fixing the caching issue gave already a great boost in performance, I don't see further optimizations, but if you see/have solutions to improve even more, please raise a PR and I am happy to test.

@realies
Copy link
Contributor Author

realies commented Mar 22, 2018

@bergware, expecting lower difference between both. Have not inspected DockerClient in detail, but the information ca be flushed as soon it gets available, similarly to how logging.htm works. If implemented asynchronously, the results could get inserted in the DOM as soon as they become available in the JSON/XML response. This will improve page responsiveness, but perhaps there are back-end elements that could be improved. Happy to do a more detailed benchmark in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants