Re: [Mono-winforms-list] Very slow performance in WinForms ListView
Le 22/04/2009 14:33, Kolhe, Jyoti B a écrit : I'm extensively using ListView (several forms with different listviews with thousands of items each) with Mono 2.4 under Fedora 11 Beta, openSUSE 11.1 and Mono SVN on Ubuntu 9.04 RC. Performance if very good and loading a listview with 5000 items will always take less than a second, even on an old Athlon XP. Did you get good performance by using BeginUpdate() and EndUpdate() calls on the listview or even without them? I always use BeginUpdate and EndUpdate. Usually, I also use the form's SuspendLayout() and ResumeLayout() methods, like this: this.SuspendLayout(); MyListView.BeginUpdate(); MyListView.Items.Clear(); for(;;) { ListViewItem Itm = MyListView.Items.Add(blah blah); Itm.SubItems.Add(blah blah); Itm.SubItems.Add(blah blah); Itm.SubItems.Add(blah blah); } MyListView.EndUpdate(); this.ResumeLayout(); "this" beign the container form. Hope it helps. Regards, Ernesto ___ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list
Re: [Mono-winforms-list] Very slow performance in WinForms ListView
Thanks for the tip. This helped my list view performance. -Jyoti From: Ernesto [mailto:equista...@gmail.com] Sent: Wednesday, April 22, 2009 11:53 AM To: Kolhe, Jyoti B Cc: mono-winforms-list@lists.ximian.com Subject: Re: [Mono-winforms-list] Very slow performance in WinForms ListView Le 22/04/2009 14:33, Kolhe, Jyoti B a écrit : I'm extensively using ListView (several forms with different listviews with thousands of items each) with Mono 2.4 under Fedora 11 Beta, openSUSE 11.1 and Mono SVN on Ubuntu 9.04 RC. Performance if very good and loading a listview with 5000 items will always take less than a second, even on an old Athlon XP. Did you get good performance by using BeginUpdate() and EndUpdate() calls on the listview or even without them? I always use BeginUpdate and EndUpdate. Usually, I also use the form's SuspendLayout() and ResumeLayout() methods, like this: this.SuspendLayout(); MyListView.BeginUpdate(); MyListView.Items.Clear(); for(;;) { ListViewItem Itm = MyListView.Items.Add(blah blah); Itm.SubItems.Add(blah blah); Itm.SubItems.Add(blah blah); Itm.SubItems.Add(blah blah); } MyListView.EndUpdate(); this.ResumeLayout(); "this" beign the container form. Hope it helps. Regards, Ernesto ___ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list
Re: [Mono-winforms-list] Very slow performance in WinForms ListView
> I'm extensively using ListView (several forms with different listviews > with thousands of items each) with Mono 2.4 under Fedora 11 Beta, > openSUSE 11.1 and Mono SVN on Ubuntu 9.04 RC. Performance if very good > and loading a listview with 5000 items will always take less than a > second, even on an old Athlon XP. Did you get good performance by using BeginUpdate() and EndUpdate() calls on the listview or even without them? -Jyoti ___ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list ___ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list
Re: [Mono-winforms-list] Strange exception related to TableLayoutPanel?
It seems like a bug. Would you mind filling a bug with an attached test case? Thanks! 2009/4/22 noda > > Hello, > > I have the strange exception below that is raised when I try to create a > new > instance of my MainForm class (a classic windows Form): > > > -- > Exception has been thrown by the target of an invocation. > at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags > invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, > System.Globalization.CultureInfo culture) [0x0] > at System.Reflection.MonoProperty.SetValue (System.Object obj, > System.Object value, BindingFlags invokeAttr, System.Reflection.Binder > binder, System.Object[] index, System.Globalization.CultureInfo culture) > [0x0] > at System.Reflection.PropertyInfo.SetValue (System.Object obj, > System.Object value, System.Object[] index) [0x0] > at System.ComponentModel.ComponentResourceManager.ApplyResources > (System.Object value, System.String objectName, > System.Globalization.CultureInfo culture) [0x0] > at System.ComponentModel.ComponentResourceManager.ApplyResources > (System.Object value, System.String objectName) [0x0] > at MAEVA.GUI.MainForm.InitializeComponent () [0x0] > at MAEVA.GUI.MainForm..ctor () [0x0] > at (wrapper remoting-invoke-with-check) MAEVA.GUI.MainForm:.ctor () > at MAEVA.Editor.NeedReload () [0x0] > > -- > > > It contains an inner exception suggesting a problem related to the > TableLayoutPanel: > > -- > LayoutSettings value cannot be set directly. > at System.Windows.Forms.TableLayoutPanel.set_LayoutSettings > (System.Windows.Forms.TableLayoutSettings value) [0x0] > at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke > (object,object[],System.Exception&) > at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags > invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, > System.Globalization.CultureInfo culture) [0x0] > > -- > > I'm running Mono 2.4 on windows when this exception occurs. It does not > occur when using the MS .Net framework. > > The binary is compiled with MSVC# 2008, and the form has nothing special > and > was designed using the form designer of visual studio. > > Do you have any idea on how to resolve this problem? Or maybe it is a bug > with Mono? > > Thanks a lot! > > Yohan > > > -- > View this message in context: > http://www.nabble.com/Strange-exception-related-to-TableLayoutPanel--tp23172152p23172152.html > Sent from the Mono - WinForms mailing list archive at Nabble.com. > > ___ > Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-winforms-list > ___ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list
[Mono-winforms-list] Strange exception related to TableLayoutPanel?
Hello, I have the strange exception below that is raised when I try to create a new instance of my MainForm class (a classic windows Form): -- Exception has been thrown by the target of an invocation. at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0] at System.Reflection.MonoProperty.SetValue (System.Object obj, System.Object value, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] index, System.Globalization.CultureInfo culture) [0x0] at System.Reflection.PropertyInfo.SetValue (System.Object obj, System.Object value, System.Object[] index) [0x0] at System.ComponentModel.ComponentResourceManager.ApplyResources (System.Object value, System.String objectName, System.Globalization.CultureInfo culture) [0x0] at System.ComponentModel.ComponentResourceManager.ApplyResources (System.Object value, System.String objectName) [0x0] at MAEVA.GUI.MainForm.InitializeComponent () [0x0] at MAEVA.GUI.MainForm..ctor () [0x0] at (wrapper remoting-invoke-with-check) MAEVA.GUI.MainForm:.ctor () at MAEVA.Editor.NeedReload () [0x0] -- It contains an inner exception suggesting a problem related to the TableLayoutPanel: -- LayoutSettings value cannot be set directly. at System.Windows.Forms.TableLayoutPanel.set_LayoutSettings (System.Windows.Forms.TableLayoutSettings value) [0x0] at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0] -- I'm running Mono 2.4 on windows when this exception occurs. It does not occur when using the MS .Net framework. The binary is compiled with MSVC# 2008, and the form has nothing special and was designed using the form designer of visual studio. Do you have any idea on how to resolve this problem? Or maybe it is a bug with Mono? Thanks a lot! Yohan -- View this message in context: http://www.nabble.com/Strange-exception-related-to-TableLayoutPanel--tp23172152p23172152.html Sent from the Mono - WinForms mailing list archive at Nabble.com. ___ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list