Skip to content

Process Monitor: optimize process tracking - #156

Open
antirotor wants to merge 14 commits into
developfrom
enhancement/optimize-stale-processes
Open

Process Monitor: optimize process tracking#156
antirotor wants to merge 14 commits into
developfrom
enhancement/optimize-stale-processes

Conversation

@antirotor

Copy link
Copy Markdown
Member

Changelog Description

Add limits to process tracking to make the Process Monitor more responsive. You can set count of the most recent processes to track. Not tracked entries are listed but no status is checked for them.

Additional review information

You can set either count and hours, or set hours to 0 to track just the last x entries.

image

Testing notes:

Use process monitor with lot of entries, play with the filter values

@antirotor antirotor self-assigned this May 26, 2026
@antirotor antirotor added the type: feature Adding something new and exciting to the product label May 26, 2026
@github-project-automation github-project-automation Bot moved this to Pending Review in PR reviewing Jun 1, 2026
@antirotor antirotor linked an issue Jun 1, 2026 that may be closed by this pull request
1 task
Comment thread client/ayon_applications/ui/process_monitor.py Outdated
Comment thread client/ayon_applications/ui/process_monitor.py Outdated
Comment thread client/ayon_applications/ui/process_monitor.py Outdated
Comment thread client/ayon_applications/process.py Outdated
Comment thread client/ayon_applications/ui/process_monitor.py Outdated
Comment thread client/ayon_applications/ui/process_monitor.py Outdated
Comment thread client/ayon_applications/ui/process_monitor.py Outdated
@antirotor
antirotor requested a review from iLLiCiTiT June 3, 2026 08:40
@BigRoy

BigRoy commented Jun 3, 2026

Copy link
Copy Markdown
Member

Can't we just mark the ones that have died of in some way so that we can completely kill tracking them to begin with? Wasn't that the root cause of the issue that we're still trying to track all - even if they've been dead forever. I feel like the "Top" and "Hours" thing just turns into a configuration thing that alleviates some things but we're still tracking e.g. 6 dead processes?

I feel like it's 'fixing' something by working around it in a confusing manner. 🤔

@antirotor

Copy link
Copy Markdown
Member Author

Can't we just mark the ones that have died of in some way so that we can completely kill tracking them to begin with?

Not as easy and conclusive as it seem.This was never meant to be full featured process monitor you have in the system. Because the process info is held in DB - but not its state - the state is periodically checked. So you query the system every n seconds "does this process exists?" and get the answer.What happens if you close the process monitor while having 5 tracked processes open and then re-launch process monitor after one month? It still needs to ask the system if the processes exists or not (and they might, or there might be process with the same number but different image (and we are handling that). My point is, that you still need something like this.
You could argue that the exposing of controls and maybe the visual indication is complicating things and that is definitely something to improve on.

Other option would be to add states to DB but that would require bigger rework of the overall logic.

@iLLiCiTiT

iLLiCiTiT commented Jul 6, 2026

Copy link
Copy Markdown
Member

I would say we should store the information about process state to the db. If we know it was closed we should not try to find it out again anymore.

If there is a process output older than month then we probably should just remove it.

@BigRoy

BigRoy commented Jul 31, 2026

Copy link
Copy Markdown
Member

I would say we should store the information about process state to the db. If we know it was closed we should not try to find it out again anymore.

If there is a process output older than month then we probably should just remove it.

Would be worth adding here now @antirotor - can you pick that up?

@MustafaJafar MustafaJafar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This works perfectly well!

@github-project-automation github-project-automation Bot moved this from Pending Review to Merge Requested in PR reviewing Aug 18, 2026
# Conflicts:
#	client/ayon_applications/process.py
#	client/ayon_applications/ui/process_monitor.py
@BigRoy

BigRoy commented Aug 19, 2026

Copy link
Copy Markdown
Member

With the other process monitor PRs merged - how relevant is this still @iLLiCiTiT ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Adding something new and exciting to the product

Projects

Status: Merge Requested

Development

Successfully merging this pull request may close these issues.

Process Monitor: performance with many processes

4 participants