mrjackwills / oxker

A simple tui to view & control docker containers
MIT License
725 stars 24 forks source link

[BUG] New filter feature (more like feedback, not a bug) #45

Closed hgoumner closed 1 month ago

hgoumner commented 3 months ago

First of all: Thanks to everyone who has contributed to oxker and this feature :)

Describe the bug

The feature works as intended, however while I'm in the filtering mode the program is incredibly slow - it takes several seconds to enter a single character and changing the filtering field (Name, Image, etc.) is also quite slow.

To Reproduce Steps to reproduce the behavior:

  1. Start oxker
  2. Press '/' to enter filtering mode
  3. Enter a query term or press 'left' / 'right' to change filtering field

Expected behavior Instant updates in the program as per input.

Desktop (please complete the following information):

Additional context I run oxker on two servers with lots of computing power. On average, there are 60 running containers on each server. For reference, I sometimes use another docker monitoring tool (ctop, written in Go) which also has a filtering feature and there it works without any lag, but I'm not sure why as I am no Rust/Go expert.

Thanks a lot in advance.

mrjackwills commented 3 months ago

Thanks, I haven't tested it with that many containers, but I can spin a load up on a low powered raspberry pi and also a single core VPS to see what results I get. Running on my home laptop (14 core/20 thread), and a couple of 2 & 4 core VPS's I rent, I've not yet encountered this exact bug.

I suspect oxker might be at the limit of it design, it might be similar to issue 42, meaning it needs to be re-written to use channels instead of shared Arc<Mutex>. Whilst this is probably the correct route to take, it would take a long time, so don't expect a fix anytime soon - but I do want to do it.

mrjackwills commented 3 months ago

@hgoumner Are you still experiencing this issue?

I created 200+ containers on my home machine, and a remote server, and couldn't get the problem to replicate.

I also span up 30 containers on an armv6 raspberry pi, which it struggled with, but again once in oxker the filtering ran at the expected speed.

hgoumner commented 3 months ago

@hgoumner Are you still experiencing this issue?

I created 200+ containers on my home machine, and a remote server, and couldn't get the problem to replicate.

I also span up 30 containers on an armv6 raspberry pi, which it struggled with, but again once in oxker the filtering ran at the expected speed.

Hey,

I'm currently on vacation, but as of last week the issue was still there. If you'd like I can send some debug reports or something once I'm back.

Thanks.