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

Provide a smoother experience on low bandwidth networks #839

Open
sbouchet opened this issue Jun 17, 2024 · 1 comment
Open

Provide a smoother experience on low bandwidth networks #839

sbouchet opened this issue Jun 17, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@sbouchet
Copy link
Collaborator

sbouchet commented Jun 17, 2024

Which functionality do you think we should update/improve?

from https://plugins.jetbrains.com/plugin/12030-openshift-toolkit-by-red-hat/edit/reviews#review=101851

It just hung there when expand namespace(project). Even worse, it froze my whole IDE(PyCharm). So please test this plugin in low speed network condition (e.g 50KB/s). Thanks.

Why is this needed?

Provide a smoother experience on low bandwidth networks.

@sbouchet sbouchet added the enhancement New feature or request label Jun 17, 2024
@adietish
Copy link
Contributor

adietish commented Jun 24, 2024

@sbouchet: the namespace is fetched via intellij-kubernetes while the child items are retrieved via odo. We should of course prevent freezes but not sure about being able to reduce the requests by odo.

Looking into the code I spot odo and helm being the culprits. Here's what's executed when you expand the namespace:

private Object[] createNamespaceChildren(@NotNull NamespaceNode namespaceNode) {
OdoFacade odo = root.getOdo().getNow(null);
if (odo == null) {
return new MessageNode[]{new MessageNode<>(root, namespaceNode, "Could not get project children")};
}
if (!odo.namespaceExists(namespaceNode.getName())) {
return new MessageNode[]{new ChangeActiveProjectLinkNode(root, namespaceNode)};
}
List<Object> nodes = new ArrayList<>();
nodes.addAll(getComponents(namespaceNode, odo));
nodes.addAll(getServices(namespaceNode, odo));
nodes.addAll(getHelmReleases(namespaceNode));
return nodes.toArray();
}

  1. odo.namespaceExists is executed via the kubernetes client and shouldn't take much time.
  2. Then the odo binary is used to getComponents, getServices and the helm binary to getHelmReleases. This takes the bulk of bandwidth/time. There isn't much we can do to improve this. The only thing I see is to display helm charts in a separate view.

Thoughts?

@rgrunber rgrunber moved this to 📋 Backlog in IDE Cloudaptors Jul 17, 2024
@adietish adietish self-assigned this Sep 13, 2024
@adietish adietish moved this from 📋 Backlog to 📝 In Progress in IDE Cloudaptors Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants