Hi, I'm a bit late, but I'd like to point that the patch below potentially causes a lot of additional method calls and string allocations. I did a quick profiling session, doing these actions : start banshee, scroll the listview of my whole library (about 2000 tracks), quit banshee. Here are the relevant parts of the "mono --profile" output. Before the patch : Time(ms) Count P/call(ms) Method name ######################## 44.652 14484 0.003 System.String::Replace(string,string) Callers (with count) that contribute at least for 1%: 14032 96 % NDesk.DBus.MatchRule::Append(StringBuilder,string,string) 248 1 % Mono.Addins.Database.ProcessProgressStatus::Decode(string) 149 1 % Banshee.GnomeBackend.GConfConfigurationClient::CreateKey(string,string) Total mem Method ######################## 933 KB System.String::ReplaceUnchecked(string,string) 933 KB 14335 System.String Callers (with count) that contribute at least for 1%: 14484 100 % System.String::Replace(string,string) After the patch : Time(ms) Count P/call(ms) Method name ######################## 221.986 110715 0.002 System.String::Replace(string,string) Callers (with count) that contribute at least for 1%: 96231 86 % Hyena.Data.Gui.ColumnCellText::UpdateLayout(Layout,string) 14032 12 % NDesk.DBus.MatchRule::Append(StringBuilder,string,string) Total mem Method ######################## 1833 KB System.String::ReplaceUnchecked(string,string) 1833 KB 42548 System.String Callers (with count) that contribute at least for 1%: 110715 100 % System.String::Replace(string,string) This is of course very un-scientific, but I thought I'd throw it out there, so that maybe someone would come up with a way to optimize this. Cheers, -- Bertrand On Thu, 2009-09-10 at 12:43 +0000, Alexander Kojevnikov wrote: > commit 9c986d97770e204a54d5741697348d449eefeb99 > Author: Alexander Kojevnikov <alexander kojevnikov com> > Date: Thu Sep 10 22:41:57 2009 +1000 > > Show multi-line strings on one line in the ColumnCellText (bgo#591802) > > .../Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > --- > diff --git a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs > index 484a292..f44cc28 100644 > --- a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs > +++ b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ColumnCellText.cs > @@ -108,6 +108,7 @@ namespace Hyena.Data.Gui > private void UpdateLayout (Pango.Layout layout, string text) > { > string final_text = GetFormattedText (text); > + final_text = final_text.Replace ("\r\n", "\x20").Replace ("\n", "\x20").Replace ("\r", "\x20"); > if (use_markup) { > layout.SetMarkup (final_text); > } else { > _______________________________________________ > SVN-commits-list mailing list (read only) > http://mail.gnome.org/mailman/listinfo/svn-commits-list > > Want to limit the commits to a few modules? Go to above URL, log in to edit your options and select the modules ('topics') you want.
Attachment:
signature.asc
Description: This is a digitally signed message part