C#C
C#2y ago
Alex

Performance Advice

Hello there! I'm currently developing some software for a certain company so I can't share that many details, however, I'd still appreciate if some people helped me thinking about a solution for this:

I have two programs, the main one and a secondary one, both written in C#. The main one is x64 whilst the secondary one is x86 due to internal dependencies written in C and compiled for x86. The only way I've found to connect these two are for both of them to be compiled and for a new Process to be called with command line arguments asking for responses on the x86 program.

This happens every time an action is performed in the x64 program, and it ends up delaying it for a second or so. This is not a big deal for the end-users (It's an internal tool and the maintenance team, which this is designed for, has expressed satisfaction with how it's coming along) but it makes a difference to me. I'm quite perfectionist when it comes to most things.

I have tested everything modularly and the operation that takes the most time, as expected, is the process being started. I have complete access to the code of the x86 program, as I'm the one that wrote it too.

My objective is to cut down on the time it takes for this action to be completed, and it seems like the issue is Process.Start. My intuitive solution is to implement a loop on the x86 that keeps it running and accepting commands and giving outputs, but that will take a lot of processing power due to what it is doing, so I'd like to keep it as a last resort.

Does anyone have any different ideas? Any inputs/knowledge/advice is appreciated! I don't know everything so I've probably missed something.

Thanks in advance!
Was this page helpful?