]]>@ab:
in mORMot2 survey you also asked how to continue with source code management and there were many answers to also keep fossil as scm (at least in parallel to github). Just for curiosity: do you intend to set up also a fossil repository for mORMot2 in future?
Thanks a lot and have a nice evening!
Paul
About such testing, we usually rather use real application logs for performance enhancements, not tests.
Regression tests tend to be not realistic, whereas logs on actual production servers gives good information.
There is already extensive statistics in both the ORM and SOA part of mORMot - with database-accessible calls stats for interface-based services.
585us 17094017
192us 52083333
//case IdemPCharArray(Method, 'POPUDESI') of
case IdemPCharArray(Method,['POST','PUT','DELETE','SIMPLE']) of
Just replacing this line will increase speed.
But in an isolated test, like below, new IdemPCharArray acts 3X faster as you say.
program project1;
uses
SysUtils,
mormot.core.base,
mormot.core.perf,
mormot.core.unicode;
var
T: ILocalPrecisionTimer;
I, C: integer;
MethodValue: RawUtf8;
Method: PUtf8Char;
begin
T := TLocalPrecisionTimer.Create;
C := 1000000;
MethodValue := 'SIMPLE';
Method := Pointer(MethodValue);
T.Start;
for I := 1 to C do
IdemPCharArray(Method, 'POPUDESI');
WriteLn('1: ', T.Stop, ', ', T.ByCount(C), ', ', T.PerSec(C));
T.Start;
for I := 1 to C do
IdemPCharArray(Method, ['POST', 'PUT', 'DELETE', 'SIMPLE']);
WriteLn('2: ', T.Stop, ', ', T.ByCount(C), ', ', T.PerSec(C));
for I := 1 to C do
PosChar('OUEI', Method[1]);
WriteLn('3: ', T.Stop, ', ', T.ByCount(C), ', ', T.PerSec(C));
ReadLn;
end.
To be sure, I am using Lazarus Stable in a Win64 i9 machine.
]]>1.54ms 6493506
383us 26109660
The new variant with IdemPCharArray('DELETE', 'POPUDEUP') is more than 40 times faster...
So I don't understand where your speed difference comes from.
@okoba any particular reason for using the "aliases" for classes in V2?
Example TSQLRest instead of TRest.
If you have any more feedback, don't hesitate!