Opened 11 years ago

Closed 11 years ago

#4604 closed defect (fixed)

Journal update_dates() called every five minutes

Reported by: manuq Owned by: manuq
Priority: High Milestone: Unspecified
Component: Sugar Version: Unspecified
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: New

Description (last modified by manuq)

I have left Sugar open all the night, and today the sugar.log is huge because of this periodic log:

1376643104.320613 DEBUG root: ListView.update_dates
1376643404.315281 DEBUG root: ListView.update_dates
1376643704.315181 DEBUG root: ListView.update_dates
1376644004.315740 DEBUG root: ListView.update_dates
1376644304.315815 DEBUG root: ListView.update_dates
1376644604.315674 DEBUG root: ListView.update_dates
1376644904.315451 DEBUG root: ListView.update_dates
1376645204.317986 DEBUG root: ListView.update_dates
1376645504.315206 DEBUG root: ListView.update_dates
1376645804.315449 DEBUG root: ListView.update_dates
1376646104.315993 DEBUG root: ListView.update_dates
1376646404.315557 DEBUG root: ListView.update_dates
1376646704.315858 DEBUG root: ListView.update_dates
1376647004.315421 DEBUG root: ListView.update_dates
1376647304.315218 DEBUG root: ListView.update_dates
1376647604.315534 DEBUG root: ListView.update_dates
1376647904.315575 DEBUG root: ListView.update_dates
1376648204.315521 DEBUG root: ListView.update_dates
1376648504.315815 DEBUG root: ListView.update_dates
1376648804.315609 DEBUG root: ListView.update_dates
1376649104.315912 DEBUG root: ListView.update_dates
1376649404.322622 DEBUG root: ListView.update_dates
1376649704.315950 DEBUG root: ListView.update_dates
1376650004.316009 DEBUG root: ListView.update_dates
1376650304.315663 DEBUG root: ListView.update_dates

That is Journal listview. My Sugar was left in the home view, not in Journal. 'git blame' shows that the log is there since 2009, so removing the log line is not a solution. Why is the Journal calling update_dates() that often, even when it is in the background? Commit 7ff13734 touches some update code.

Attachments (1)

shell.log-buggy (28.8 KB) - added by manuq 11 years ago.
Complete log

Download all attachments as: .zip

Change History (7)

comment:1 Changed 11 years ago by manuq

  • Description modified (diff)

comment:2 Changed 11 years ago by manuq

  • Summary changed from shel.log grows indefinitely to Journal update_dates() called every five minutes

Changed 11 years ago by manuq

Complete log

comment:3 Changed 11 years ago by dnarvaez

  • Bug Status changed from Unconfirmed to New
  • Priority changed from Urgent to High

comment:4 Changed 11 years ago by godiard

This happen because the logic used by on journalactivity.py to set the visibility of the journal is not working.

Thew listview in the journal have a method set_is_visible(), when is not visible, the events in the datastore set a dirty flag, but the view is not updated until needed, also the timer used to update the dates is stopped.

In journalactivity.py there are two methods using set_is_visible(), one triggered by visibility-notify-event and the other triggered by window-state-event, but the visibility_notify_event_cb recibe event.get_state() == None when switch from the Journal to one activity (but not when switch to other view with F1/F2/F3).

This problem have other consequences, like triggering view updates quering the journal for every update in the journal, while another activity is at top, like in the case of Browse downloading a file.

comment:5 Changed 11 years ago by godiard

Pull request sent with a fif for this issue https://github.com/sugarlabs/sugar/pull/96

comment:6 Changed 11 years ago by Gonzalo Odiard

  • Resolution set to fixed
  • Status changed from new to closed

Use focus-in/out events to set the visibility in the journal - SL# 4604

The callback method of the signal 'visibility-notify-event' receive
event.get_state() == None in the case of changing from the Journal to
another activity, but not when changing to other views using F1, F2, F3.
Use focus-in/focus-out events to set the visibility of the listview,
because this works with realibility. Fixes #4604

Signed-off-by: Gonzalo Odiard <gonzalo@…>

Changeset: dccca0fe5f16b64be35b80840763bb0ff3db6162

Note: See TracTickets for help on using tickets.