mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:07:34 +00:00
SystemMonitor: Don't reopen process statistics file on every update
This file can just remain open; we seek to its start anyways. This previously accounted for over 5% of SystemMonitor runtime.
This commit is contained in:
parent
26d8ac844c
commit
7d53767ce8
2 changed files with 20 additions and 1 deletions
|
@ -240,6 +240,10 @@ private:
|
|||
|
||||
int thread_model_row(Thread const& thread) const;
|
||||
|
||||
ErrorOr<void> initialize_process_statistics_file();
|
||||
|
||||
OwnPtr<Core::File> m_process_statistics_file;
|
||||
|
||||
// The thread list contains the same threads as the Process structs.
|
||||
HashMap<int, NonnullRefPtr<Thread>> m_threads;
|
||||
Vector<NonnullOwnPtr<Process>> m_processes;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue