user1196549
user1196549

Reputation:

C++ WinForms application dead slow in a 64 bits build

I have a WinForms application that is running fine under 32 bits, and is terribly slow under 64 bits (both Debug or Release builds). The environmant is .NET Framework 4.0, Windows 10. Occurs with different versions of Visual Studio.

Terribly slow means 1 second for 32 bits, 10 minutes for 64.

I have the feeling that the slowness occurs during the filling of a DataGridView, But I can't be definite.

I have tried using the Profiler, but all the time is spent in [External Code], which is completely opaque.

Have you already met a similar problem ? How can I investigate ?

Upvotes: 0

Views: 183

Answers (1)

user21508463
user21508463

Reputation:

I finally understood the issue, not related to a GridView but to a TrackBar, that was assigned a too large maximum value, corresponding to tons of tick marks.

The issue was difficult to track for three reasons:

  • it occurred only with 64 bits builds,

  • it occurred asynchronously with the GUI update,

  • it required mixed-mode debugging as the code was alternating between managed and non-managed code.

I could only spot it by following the method of @Paul Sanders: pause the debugger randomly and check the call stack (after loading the relevant symbols). After various attempts, I saw references to TrackBar methods.

Upvotes: 0

Related Questions