Why does this statement take so much longer on a faster machine?

Torquinian 1 Reputation point
2025-02-28T15:36:23.58+00:00

I am using VS2022 and Basic. I am finding that when the compiled EXE is run on an old APP Server with old Visual C++ Redistributables that this statement runs acceptably fast, but if I run the same EXE on a new APP Server with current Visual C++ Redistributables, this statement runs much more slowly and I wonder if anyone has any ideas.

            While reader.Read

                cboOrderNo.Items.Add(reader("orderno"))

                cboHiddenPId.Items.Add(reader("p_id"))

            End While

The statement in question is the one where the OrderNo Combo box is being populated. If it is commented out, the module runs as quickly as expected, but with the PId Combo box being commented out it is much slower. The reader("orderno") field is from an SQL Database, varchar(6) and each entry is 6 characters long.

The old APP Server has 16GB, the new APP Server has 128GB.

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,793 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.