Skip to content

Conversation

Ramilito
Copy link
Owner

@Ramilito Ramilito commented Aug 5, 2024

Solves #135 and parts of #23

Adds an alias search pop with tab autocomplete.
Choosing one will load that view.
If we have support for the view, that will be loaded otherwise a fallback view (generic view) with basic functionality (describe, edit, delete)

aliases

@Ramilito Ramilito changed the title Feat/aliases view feat: aliases view Aug 5, 2024
@Ramilito Ramilito merged commit 15c4118 into main Aug 6, 2024
1 check passed
@Ramilito Ramilito deleted the feat/aliases_view branch August 6, 2024 21:43
@mosheavni
Copy link
Collaborator

mosheavni commented Aug 7, 2024

Does every <C-a> reloads the api-resources?
I'm not sure the flag --cached is working for me, hitting <C-a> is kinda slow every time.

@Ramilito
Copy link
Owner Author

Ramilito commented Aug 7, 2024

Hmm I was hoping the cached would solve the performance tbh, running my own test seems to be performant, could you try running these commands?

time kubectl api-resources --cached
time kubectl api-resources

For me, the difference is almost 150ms so it seems to be doing something, the timing inside the plugin is also similar in loading time, from:
Execution time: 0.086942375 seconds <- with cached
Execution time: 0.176638708 seconds <- without cached

@mosheavni
Copy link
Collaborator

Hmm I was hoping the cached would solve the performance tbh, running my own test seems to be performant, could you try running these commands?

time kubectl api-resources --cached
time kubectl api-resources

For me, the difference is almost 150ms so it seems to be doing something, the timing inside the plugin is also similar in loading time, from: Execution time: 0.086942375 seconds <- with cached Execution time: 0.176638708 seconds <- without cached

i have a cluster with many CRDs, a heavy cluster.
it gives me:

kubectl api-resources --cached  0.24s user 0.07s system 15% cpu 1.996 total

for me it's noticable for a window that should open very quick (maybe also rendering the float takes time)

I think it's better to keep an in-memory cache (M.cached_api_resources = {...})

@Ramilito
Copy link
Owner Author

Ramilito commented Aug 7, 2024

Yeah two seconds is waaaaay too long for a quick nav, Il check if I can do a preload and a cache.

@Ramilito
Copy link
Owner Author

Ramilito commented Aug 7, 2024

Added a new issue: #139

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

Successfully merging this pull request may close these issues.

2 participants