mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
SystemMonitor: Make all tabs except the process table lazily loaded
We now use GLazyWidget for all the secondary tabs, which makes the program start up way faster than before. There's a noticeable delay when you click on the "PCI Devices" tab for the first time, but that's definitely better than always eating that delay before seeing a window at all. :^)
This commit is contained in:
parent
183f7c9830
commit
9da121f837
9 changed files with 253 additions and 201 deletions
|
@ -27,7 +27,9 @@ public:
|
|||
__Count
|
||||
};
|
||||
|
||||
static NonnullRefPtr<ProcessModel> create(GraphWidget& graph) { return adopt(*new ProcessModel(graph)); }
|
||||
static ProcessModel& the();
|
||||
|
||||
static NonnullRefPtr<ProcessModel> create() { return adopt(*new ProcessModel); }
|
||||
virtual ~ProcessModel() override;
|
||||
|
||||
virtual int row_count(const GModelIndex&) const override;
|
||||
|
@ -37,10 +39,10 @@ public:
|
|||
virtual GVariant data(const GModelIndex&, Role = Role::Display) const override;
|
||||
virtual void update() override;
|
||||
|
||||
private:
|
||||
explicit ProcessModel(GraphWidget&);
|
||||
Function<void(float)> on_new_cpu_data_point;
|
||||
|
||||
GraphWidget& m_graph;
|
||||
private:
|
||||
ProcessModel();
|
||||
|
||||
struct ProcessState {
|
||||
pid_t pid;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue