Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

history: get back performance of logview

Since 'changes' column is introduced on default branch, logivew has
faced performance problem. A repo.status() calling is direct cause
of it, but it's not a root cause; 'changes' column is always added
even if 'changes' column is hidden.

Because History dialog passes all columns to set_columns() method of
treeview, treemodel is requested all data for columns. So we have to
pass only displaying columns. This means that treeview doesn't have
full order of columns, only displaying columns in 'self.columns'
variable.

Changeset 9b3b903386b6

Parent a1eb5844b2e3

by Yuki KODAMA

Changes to one file · Browse files at 9b3b903386b6 Showing diff from parent a1eb5844b2e3 Diff from another changeset...

 
545
546
547
548
 
549
550
551
 
711
712
713
714
715
716
717
 
 
 
 
 
 
 
 
 
718
719
 
720
721
722
 
776
777
778
779
 
780
781
782
 
545
546
547
 
548
549
550
551
 
711
712
713
 
 
 
 
714
715
716
717
718
719
720
721
722
723
 
724
725
726
727
 
781
782
783
 
784
785
786
787
@@ -545,7 +545,7 @@
  gobject.TYPE_STRING,   gobject.TYPE_STRING)   - for c in self.graphview.get_columns(): + for c in self.column_order.split():   vis, text, prop, col = columns[c]   model.append([vis, text, prop, col])   @@ -711,12 +711,17 @@
  self.syncbox.set_property('visible', self.show_syncbar)   self.syncbox.set_no_show_all(True)   - for col in [col for col in DEFAULT_COLS.split() if col != 'graph']: - if col in self.showcol: - self.graphview.set_property(col+'-column-visible', - self.showcol[col]) + columns = [] + for col in [c for c in self.column_order.split()]: + if col == 'graph': + vis = self.graphcol + elif col in self.showcol: + vis = self.showcol[col] + self.graphview.set_property(col + '-column-visible', vis) + if vis: + columns.append(col)   try: - self.graphview.set_columns(self.column_order.split()) + self.graphview.set_columns(columns)   except KeyError:   # ignore unknown column names, these could originate from garbeled   # persisted data @@ -776,7 +781,7 @@
  vis = self.graphview.get_property(col+'-column-visible')   settings['glog-vis-'+col] = vis   settings['filter-mode'] = self.filtercombo.get_active() - settings['column-order'] = ' '.join(self.graphview.get_columns()) + settings['column-order'] = self.column_order   return settings     def load_settings(self, settings):