|
-
July 25th, 2024, 10:28 AM
#2
Re: ADO / Cpp msado15.dll performance problem sous Visual Studio 2019 (C++ ET VB
Hello everyone (I do this in French, my English is too limited)
I have two super simple test applications (to highlight a big performance problem). => it's an extraction (so everything is in hand) of a large application)
One in C++/MFC/ADO (#import msAdo15.dll), the other in VB.NET/ADO (ADOX...msAdo15.dll).
The connection/recordset settings are a priori identical on both sides.
The properties when we retrieve them, are not identical => my instinct tells me, no default settings, platforms (Cpp/VB), a bit like with XP, 7, vista when we play with OnPaint(), and we do not initialize all the optional elements...
Algorithmically speaking, we read a table from an Access database, which we will write in another Access database, a basic copy beast in short.
The VB code executes in 5 seconds for 15,000 records, the Cpp code takes 30 minutes...and the gap widens exponentially...(for 1000 VB records: 1s CPP: 5s a ladle).. .
=>probable problem in the settings of the recordset which must be refreshed even though it is not necessary...
I've seen lots of posts on this problem on the web, but no relevant solution, which sticks? my context. Even though I modify the settings, it does not impact the non-perf.
When I use the profiler (CPU), I spend 99% of my time in ADO AddNew() (if I use the 'implicit' update) and 99% of my time in Update(), if I put this one explicitly.
So would there be an ADO configuration 'specialist' in the room?
My two solutions (.sln) are ? available for anyone who has a lead...or an idea...or wants to explore the problem (but it is imperative to master ADO, so beginners refrain)...
THANKS...
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|