Opened 17 years ago

Closed 17 years ago

Last modified 15 years ago

#187 closed Defect (fixed)

Manager Refresh Rates Incorrect

Reported by: charlief Owned by: romw
Priority: Major Milestone: 5.10
Component: Manager Version:
Keywords: refresh, statistics Cc:

Description (last modified by charlief)

This problem manifests itself in 3 ways:

(1) If the Statistics tab was the last pane selected when exiting BOINC, then when BOINC is restarted, its CPU usage is quite high as long as that pane is displayed. However, once you switch to another tab and back, the CPU usage returns to normal.

(2) The same problem occurs if switching from Simple View to Advanced view when the previously selected Advanced View pane is Statistics or Disk Usage. To reproduce:

  • Select Statistics tab
  • Select Simple View
  • Quit BOINC Manager
  • Launch BOINC Manager
  • After connection is made, switch to Advanced View
  • Statistics tab will appear but has high CPU usage; it is apparently being updated once per second instead of once per minute.

(3 )If the current tab is one of the less-frequently updated panes (Disk or Statistics) then it takes a very long time for the information to update when you switch the manager's connection from localhost to a remote computer or vice-versa.

It's reasonable to assume that switching from one remote computer to another would similarly be slow to respond.

I found these problems to be true on both Windows and Mac for the Statistics pane, and also for the Mac on the Disk pane.

Analysis:

Both of these functions overload the CBOINCBaseViews::GetViewRefreshRate() method, and call it to reduce their update frequencies because their updates consume a large amount of CPU time. (This is true for Statistics on both platforms, but for Disk Usage only on the Mac.)

However, GetViewRefreshRate() is called from only one place: CAdvancedFrame::OnNotebookSelectionChanged(). This means that it is ignored if BOINC is started with one of these panes initially selected.

The CAdvancedFrame::CAdvancedFrame() constructor starts the timer with a 1 second interval to ensure that the pane is drawn soon after connection to the core client has been established.

Likewise, CAdvancedFrame::OnNotebookSelectionChanged() starts the timer with a 1 second interval if the connection has not yet been made and calls GetViewRefreshRate() if the Manager is connected.

I believe the solution would be to make the following call whenever any connection to a local or remote core client is established and also when switching from Simple View to Advanced View:

m_pFrameListPanelRenderTimer->Start(pView->GetViewRefreshRate() * 1000);

However, if we reduce the refresh rate immediately on detecting connection to the CC or immediately on change from Simple to Advanced View, then the initial display of the tab page will take a long time.

Some possible solutions:

  • Call OnRefresh() directly and also change the refresh rate.
  • Call OnListRender() directly and also change the refresh rate.
  • Post a timer event to the event queue (will calling Refresh() do this?) and also change the refresh rate.
  • Set a flag to be checked by the timer routine to tell it to change its own refresh rate and then reset the flag.

I'm passing this on to Rom, because I think he has a better understanding of the subtleties involved in the Manager's work flow and can determine the best fix.

Change History (5)

comment:1 Changed 17 years ago by charlief

Description: modified (diff)

comment:2 Changed 17 years ago by charlief

Description: modified (diff)

comment:3 Changed 17 years ago by charlief

Description: modified (diff)

comment:4 Changed 17 years ago by Nicolas

Why not on initial display of tab, refresh once regardless of the timer? (or am I missing something / misunderstanding everything?)

All tabs should be refreshed as soon as the connection is done, OR, all tabs should be marked as "having outdated information" when you connect to another host, and when you change to another tab, if(tab.has_outdated_info) refresh_now().

By the way, isn't disk usage tab slow on other platforms too?

comment:5 Changed 17 years ago by romw

Resolution: fixed
Status: newclosed

(In [12713]) - fixes #187 - Fix the initial refresh interval for the various

views.

clientgui/

AdvancedFrame?.cpp, .h

Note: See TracTickets for help on using tickets.