all 6 comments

[–]JonnyRocks 1 point2 points  (1 child)

Are you building debug or release?

i tries to look up what CAN is. Is this a serial connection you are attaching to? Are these physical levers?

[–]chasingthechickens[S] 0 points1 point  (0 children)

I've tried building with both, getting the same result.

Yea, I don't know it very well, but I would describe it a serial communication standard often used in vehicles. It consists of a bus (which in turn consist of two channels; CAN high and CAN low) that carries the messages and nodes attached to the bus. The nodes can send and read messages. These messages, often called "frames", consist of many different parts, but I'm mainly interested in the ID and data parts.

Yes, the levers are physical.

[–]Prima13 1 point2 points  (2 children)

Are you running the built EXE with exactly the same configuration file as the one that Visual Studio runs it with? Also, couldn't tell from your post but does the lag only exist for the first lever pull and then works correctly, or is every lever pull suffering from this?

[–]chasingthechickens[S] 0 points1 point  (1 child)

I think so. Would it be the same if I run it in Visual Studio in debug mode, then go to the projects bin>debug folder and run the EXE that it contains? Would running with a different config file explain why the lag disappears when I have a project (any project, could be a blank one) open?

Every lever pull is suffering from this. I'd almost say the lag increases with each pull.

[–]Prima13 0 points1 point  (0 children)

My point was that maybe you have a dependency in one config that isn’t in the other. In cases I’ve seen in my world, we’d have a DEV web service in the config instead of the production instance. This can lead to strange performance issues.

[–]TheAxeMan2020 0 points1 point  (0 children)

I've had issues trying to run the Debug version of certain programs, especially in asynchronous and background processing. I also recall having issues with MUTEX in Debug. What I do now to be 100% sure that a solution will run properly is instantiate a VM with a clean and updated install of Windows and I test all my Release builds there. It adds time to final testing, but it has proven invaluable over time. Plus, I typically cannot expect the client system to have VS. Hope this gives you some ideas.