36
« on: November 09, 2023, 09:22:43 pm »
I'm not surprised. No matter how you look at it, you are still using a WAN connection to your database.
To rule out PCS as the source of the problem, you could experiment using a direct database connection instead (if you can get the infra guys to agree to open up the necesarry ports on the firewall)
I would expect the direct connection to performance the same at best, but probably worse.
The only real solution I know is to put the client application as close to the database as possible.
I have a lot of clients using either Citrix or Microsoft Terminal Services technology (Remote Desktop, AVD, WVD, whatever they call it this week)
The client is then installed in the same datacenter as the database, so as close as you can get.
It's still not as fast as a when I run tests on my laptop using a locally installed database, but usually fast enough.
My performance tests show a difference of factor 2 or 3 (so 100 seconds locally on my testmachine is 200 to 300 seconds on the production client)
Yours is a factor 20 difference (200 ms -> 4000 ms)
Another big thing is to circumvent the API as much as possible.
I recently refactored a big part of my framework to use only database queries (Repository.SQLQuery) for anything that is not writing.
This was a major improvement to the performance of my tools.
The next thing I'm working on is to use my own database connection instead of relying on Repository.SQLQuery.
Initial tests show this might improve performance with a factor 10 or more.
Geert