The MidasSpeedFix.pas is a unit that improves the performance of the Midas.dll and MidasLib unit. This is done by replacing the Midas memory manager with the Delphi memory manager (FastMM4). The unit compiles and works with Delphi 6 to 2009. (My Delphi 5 Pro doesn’t have a DSIntf unit)
Delphi 6 to 2005: FastMM4 must be compiled in RELEASE mode to get maximal speed.
How to use:
Add the MidasSpeedFix.pas unit to your Delphi or C++ Project (ProjectManager: Add Unit)
Download:
Name | IDE Version | File | Size | Downloads | Added |
---|---|---|---|---|---|
Midas Speed Fix 1.2 | 6-2009 | MidasSpeedFix12.zip | 35.96 KB | 6717 times | 2009-03-11 |
Man, you are really a genius. God bless you! 😉
Best regards
Excellent work!
YOU. ARE. THE. MAN.
This unit belongs to VCLFix.pas, I would say…
Fabulous! that’s really help.
Best regards
Thank you for all your generous donations to Delphi community!
Já foi respondida minha duvida, favor desconsiderar a pergunta anterior…
Obrigado.Pela.Atencao;
Hi Andreas.
I’ve tested you MidasSpeedFix with success in BDS 2006. I’ve tested a ClientDataSet inserting 57,000 records and it is flying now!
But the funny thing is: When the same 57,000 records come from another DataSet (through a linked TDataSetProvider), the time the CDS is 10 times slower (4.5 seconds, inserting x 44 seconds, loading from TDataSet+TDataSetProvider). The original DataSet (an ADOQuery) takes only 0.75 seconds to fetch all recordset. Isn’t it weird?
Best regards
About my previous post: Forget about it! The problem is not inside Midas. Simply, the provider doesn’t call DataSet.DisableControls, and so most of the time is spent scrolling the DataSet. 😉
Best Regards
You are amazing !!! Got better results with more records. Over 50% increase when inserting!
Hi Andreas,
First a huge thanks for all your efforts. I have used this fix in an .exe project that used the midaslib unit and all went well. But, I have another project in which the fix is not working. That project is built with packages and is also using midaslib that is compiled (the midaslib unit i mean) inside its own package. So, I have package prtnrMidas70.bpl that contains the midaslib unit. My .exe is using the above mentioned package (along with all the other needed packages). It is also using the FastMM4 unit and your MidasSpeedFix.pas. It is failing to find the Org_MidasMalloc! Any ideas? I’m using Delphi 7 on this project.
Please contact me directly in case you need any additional info.
Thanks in advance,
George
In that case you must add the MidasSpeedFix unit to the prtnrMidas70.bpl package. MidasSpeedFix uses the HInstance variable to find the memory addresses. And if MidasSpeedFix is in a different module than the MidasLib unit, HInstance will point to the wrong module.
In the CodeGear article:
http://dn.codegear.com/print/29297
There is mention of the MidasLib unit, in the “Deploying Applications Without the Midas Library” section.
Will the MidasSpeedFix still provide benefit, if you are using the MidasLib?
“improves the performance of the Midas.dll and >>> MidasLib <<< unit"
Hi,
Looks great. Can this unit also be used in a Delphi.NET project? I’m currently using a TClientDataSet in a Delphi.NET (2007) project…
Thanks!
@Guus: If you put the unit into a native DLL and then load the DLL into your Delphi.NET application where you use the Midas.dll, then yes.
Hi Andreas,
i’m speechless…
if it was a MS product they had you on their MVP list already…
thx!!!
You’re a God!
Save Andy!
Thanks Andy, works great !!
🙂
It gives no real effect if one uses Full fastMM4 in “FullDebug” mode under D 2007,
but my the same test works more then twice faster “Release” mode.
Thanks a Lot!
MidasSpeedFix 1.1 allows you to use a Release-FastMM4 for Midas and the FullDebug-FastMM4 for your application.
It can be used with projects that use httpsrvr.dll ?
Thanks!