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

chore: reduce initial REST API calls #2419

Merged
merged 3 commits into from
May 11, 2023
Merged

chore: reduce initial REST API calls #2419

merged 3 commits into from
May 11, 2023

Conversation

benoitf
Copy link
Collaborator

@benoitf benoitf commented May 9, 2023

What does this PR do?

When Podman Desktop starts, it tries to fetch and refresh data like containers, images, volumes, pods a lot of time.
For example after an extension is started, etc.
But podman REST API has no cache and getting volume data like the size can take 5+s

so, instead of that, performs only one fetch for containers, images and pods when Podman Desktop is started
and then for volumes, first initialization occurs only if we ask for it.

Screenshot/screencast of this PR

N/A

What issues does this PR fix or reference?

Fixes #2375
Fixes #2310
Fixes #2259

How to test this PR?

Unit tests

but also try to use Podman Desktop with large images/volumes

Change-Id: I761f508ff3389a1253fb3ff273a84bb586d1c391

@benoitf benoitf force-pushed the DESKTOP-2375 branch 2 times, most recently from b056432 to 80584c5 Compare May 10, 2023 11:54
@benoitf benoitf marked this pull request as ready for review May 10, 2023 11:54
@benoitf benoitf requested a review from a team as a code owner May 10, 2023 11:54
@benoitf benoitf requested review from jeffmaury and cdrage and removed request for a team May 10, 2023 11:54
Change-Id: I4cd5baec2269e080d2323f79d2f89cc52ac07966
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
During startup, lot of extensions can be started, etc
so we don't try to refresh on every extension start, just when all
extensions are loaded
It reduces the number of initial calls to populate the store

Change-Id: I94f2235a411ec9633300c813134f3a2d4e3b46ae

Signed-off-by: Florent Benoit <fbenoit@redhat.com>
fetch them only if user click on the volumes tab
Grabbing volumes with their size can take a while so initial call
is only if we ask for it.

Change-Id: Ie8f24c6f7aa5adae6c8d1644884232654a6931bb

Signed-off-by: Florent Benoit <fbenoit@redhat.com>
Copy link
Contributor

@jeffmaury jeffmaury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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