Click here to Skip to main content
15,920,503 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Import Excel columns in existing SQL database Pin
T210230-Nov-09 16:27
T210230-Nov-09 16:27 
GeneralRe: Import Excel columns in existing SQL database Pin
luccingolo2-Dec-09 5:45
luccingolo2-Dec-09 5:45 
GeneralRe: Import Excel columns in existing SQL database Pin
T21024-Dec-09 3:35
T21024-Dec-09 3:35 
GeneralRe: Import Excel columns in existing SQL database Pin
Groufty4-Dec-09 5:54
Groufty4-Dec-09 5:54 
QuestionAccessing Datagrid _RowID Pin
CARisk330-Nov-09 7:09
CARisk330-Nov-09 7:09 
AnswerRe: Accessing Datagrid _RowID Pin
Dave Kreskowiak30-Nov-09 7:23
mveDave Kreskowiak30-Nov-09 7:23 
GeneralRe: Accessing Datagrid _RowID Pin
CARisk330-Nov-09 8:04
CARisk330-Nov-09 8:04 
QuestionSlow form close that contains a DataGridView with bound combobox columns Pin
Marcus J. Smith30-Nov-09 5:21
professionalMarcus J. Smith30-Nov-09 5:21 
I have a form that displays a list of records in a DataGridView. The recordset in question is about 9,000 records. I know that is a lot but is required by the application.

The problem I am experiencing is the form closing. I call the dispose methods of some class level variables which slows the close down quite a bit. I have seen it take anywhere from 10 seconds to 2+ minutes. This is a hinderence to the users of the application. I have written some Debug.Writeline() statements with timestamps to see how long each dispose call is taking. The slowdown is on my unfiltered datatables which are bound to the DGV combobox columns. A filtered version is bound to each individual cell that is edited but after the edit the original unfiltered datatable is bound to the cell again. The unfiltered tables only contain 20 or so records but are taking 8+ seconds minimum to clear and dispose compared to the milliseconds it is taking all of the other tables.

Here is my current iteration of the close (please note that the original call was only to dispose of the _Utilities object, I have added the other calls to try tracking down the issue):

uxRecords.Clear()
uxRecordsBindingSource.DataSource = Nothing
uxRecordDataGrid.DataSource = Nothing
uxRecordDataGrid.Rows.Clear()

CType(uxRecordDataGrid.Columns("uxVersionNameGrid"), DataGridViewComboBoxColumn).DataSource = Nothing

For Each versionNameCell As DataGridViewComboBoxCell In CType(uxRecordDataGrid.Columns("uxVersionNameGrid"), DataGridViewComboBoxColumn).Items
            versionNameCell.DataSource = Nothing
Next

CType(uxRecordDataGrid.Columns("uxDepartmentNameGrid"), DataGridViewComboBoxColumn).DataSource = Nothing

For Each departmentNameCell As DataGridViewComboBoxCell In CType(uxRecordDataGrid.Columns("uxDepartmentNameGrid"), DataGridViewComboBoxColumn).Items
            departmentNameCell.DataSource = Nothing
Next

CType(uxRecordDataGrid.Columns("uxSizeGrid"), DataGridViewComboBoxColumn).DataSource = Nothing

For Each sizeCell As DataGridViewComboBoxCell In CType(uxRecordDataGrid.Columns("uxSizeGrid"), DataGridViewComboBoxColumn).Items
            sizeCell .DataSource = Nothing
Next

_Utilities.Dispose()


The _Utilities.Dispose call disposes of each table and that is where the slowdown is. Everything up to that call occurs within the same second.


CleaKO

"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)

AnswerRe: Slow form close that contains a DataGridView with bound combobox columns Pin
Dave Kreskowiak30-Nov-09 7:16
mveDave Kreskowiak30-Nov-09 7:16 
GeneralRe: Slow form close that contains a DataGridView with bound combobox columns Pin
Marcus J. Smith30-Nov-09 8:04
professionalMarcus J. Smith30-Nov-09 8:04 
GeneralRe: Slow form close that contains a DataGridView with bound combobox columns Pin
Dave Kreskowiak30-Nov-09 10:44
mveDave Kreskowiak30-Nov-09 10:44 
GeneralRe: Slow form close that contains a DataGridView with bound combobox columns Pin
Luc Pattyn30-Nov-09 11:33
sitebuilderLuc Pattyn30-Nov-09 11:33 
GeneralRe: Slow form close that contains a DataGridView with bound combobox columns Pin
Dave Kreskowiak30-Nov-09 14:51
mveDave Kreskowiak30-Nov-09 14:51 
GeneralRe: Slow form close that contains a DataGridView with bound combobox columns Pin
Marcus J. Smith1-Dec-09 10:03
professionalMarcus J. Smith1-Dec-09 10:03 
QuestionHow to Get the MSI installer Path Pin
coolpjmartin30-Nov-09 4:28
coolpjmartin30-Nov-09 4:28 
AnswerRe: How to Get the MSI installer Path Pin
Dave Kreskowiak30-Nov-09 7:07
mveDave Kreskowiak30-Nov-09 7:07 
GeneralRe: How to Get the MSI installer Path Pin
The Man from U.N.C.L.E.30-Nov-09 7:15
The Man from U.N.C.L.E.30-Nov-09 7:15 
GeneralRe: How to Get the MSI installer Path Pin
Dave Kreskowiak30-Nov-09 7:18
mveDave Kreskowiak30-Nov-09 7:18 
GeneralRe: How to Get the MSI installer Path Pin
The Man from U.N.C.L.E.30-Nov-09 7:31
The Man from U.N.C.L.E.30-Nov-09 7:31 
GeneralRe: How to Get the MSI installer Path Pin
Dave Kreskowiak30-Nov-09 10:45
mveDave Kreskowiak30-Nov-09 10:45 
AnswerRe: How to Get the MSI installer Path Pin
The Man from U.N.C.L.E.30-Nov-09 7:07
The Man from U.N.C.L.E.30-Nov-09 7:07 
GeneralRe: How to Get the MSI installer Path Pin
coolpjmartin9-Dec-09 0:26
coolpjmartin9-Dec-09 0:26 
QuestionFTP Question Pin
Member 470558430-Nov-09 4:03
Member 470558430-Nov-09 4:03 
AnswerRe: FTP Question Pin
Dave Kreskowiak30-Nov-09 7:04
mveDave Kreskowiak30-Nov-09 7:04 
GeneralRe: FTP Question Pin
Member 470558430-Nov-09 7:46
Member 470558430-Nov-09 7:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.