Bugzilla – Bug 321974
DataGridView causes 100% CPU usage
Last modified: 2007-09-15 21:24:06 UTC
---- Reported by eetasoft@online.ee 2006-09-03 09:27:49 MST ---- Description of Problem: Running exe file using DataGridView in Windows XP using Mono 1.1.17.1 is extremely slow. Steps to reproduce the problem: 1. Download and unpack http://eetasoft.ee/datagridviewnotworking.zip Run PostgreSQL with some database containig big table. 2. Replace line in form1.designer.cs with you connection string: this.npgsqlConnection1.ConnectionString = "SERVER=localhost;DATABASE=eetasoft;USER ID=admin;PASSWORD=a;ENCODING=UNICODE;"; 3. Replace the line in Form1.cs with select witch returns a lot of rows: this.npgsqlCommand1.CommandText = "select * FROM firma1.klient order by 1"; 4. Build exe file with VCS and run it under MONO 1.1.17.1 under Windows XP Actual Results: Windows Task Manager shows that mono.exe uses 99% CPU if application has focus. Grid responds to keystrokes after very long delay so that editing data is impossible. Expected Results: CPU usage should be 0. Application must respond to keystrokes immediately. How often does this happen? Always. Additional Information: If this sample is changed to use DataGrid (only 2 lines need to be changed), all is OK. ---- Additional Comments From eetasoft@online.ee 2006-09-03 09:52:36 MST ---- Created an attachment (id=170404) VCS solution to reproduce the bug ---- Additional Comments From jackson@ximian.com 2006-09-05 11:22:44 MST ---- Changing to the 2.0 milestone, since the datagridview is a 2.0 control. ---- Additional Comments From pedromj@gmail.com 2006-11-04 11:58:24 MST ---- Please, make a sample without database that shows the bug. For example you can use XML/DataSet to feed the DataGridView. ---- Additional Comments From kobruleht2@hot.ee 2007-04-30 12:56:29 MST ---- Here is code to reproduce the issue. using System.Windows.Forms; using System.Data; using System; using System.IO; static class Program { static void Main() { Application.Run(new Frm()); } } class Frm : Form { public Frm() { System.Data.DataSet dataSet1 = new DataSet(); StringReader strReader = new StringReader(@"<?xml version=""1.0"" standalone=""yes""?> <NewDataSet> <Table> <kood>1 </kood> <nimi>Firma ise, 1. arveldusarve </nimi> </Table> </NewDataSet> "); dataSet1.ReadXml(strReader); DataGridView dataGrid1 = new DataGridView(); Controls.Add(dataGrid1); dataGrid1.AutoGenerateColumns = true; dataGrid1.DataSource = dataSet1.Tables[0]; } } ---- Additional Comments From monkey@jpobst.com 2007-07-31 18:16:16 MST ---- Test case was added by submitter, taking the NEEDINFO flag off. ---- Additional Comments From rolfkvinge@ya.com 2007-08-09 14:07:44 MST ---- Fixed in r83776. Imported an attachment (id=170404) Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>XP SP2</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".