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!19 replies
Adding program to Local Machine Registry
Hey there! I've been trying to add a program to the local machine registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
so that it runs on boot, but this seemingly isn't working. I have administrator privileges.
That's the code I'm using; There's more that checks if it is in and stuff, and whilst key.GetValue()
returns an actual value and not null, the entry isn't added to regedit, and my program doesn't actually start on boot. Help?2 replies
✅ SQLConnection and queries to the database
Hey there!
I've been having this problem lately with something i'm writing, which essentially boils down to the following code:
When I run this, it seems to just not find my
Alunos
table, and I end up having to write [{database}].[dbo].[Alunos]
even though I had specified that I wanted to start out with a database in my connection string. What am I doing wrong here? I don't want to have to write my queries with dbo.(...)
; I'd rather just switch to the database I want at runtime and then query a table directly 😅33 replies
❔ Jetbrains Rider - Designer Stuck on Loading
Whilst trying to open any form designer in any computer, my project seems to get stuck on loading forever. This is happening on Rider 2023, latest.
https://github.com/MrKelpy/MCSMLauncher
Any help? I'm not sure what's causing this, but I can't go on without it.
10 replies
❔ Invalid Data Exception when extracting files
I am getting a
System.IO.InvalidDataException: Found invalid data while decoding.
error while running this line...
Though I have no idea why. The file that I am extracting is one that has been downloaded, with the following code: https://pastecode.io/s/2rhskczr
Is there something i'm missing here?22 replies
When to use Databases vs Filesystem Storage
I have a question about the title: I've gone around the internet looking for answers in this, but I haven't found a concrete one. I understand that Filesystem Storage is supposed to be "temporary", as in saving files to the client, and a database is supposed to be permament, storing the files in the database hosted in a server, and having everything go through software in the server that accesses the database and brings back a response. But why should it be done this way, and instead, why can't the stuff be stored in the server's filesystem storage, permanently? It seems simpler, and the answer can't just be "due to performance and speed", can it?
25 replies