Jump to content

microtronx

Members
  • Content Count

    136
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by microtronx


  1. We can recommend ReportBuilder from Digital-Metaphors. We're using it since 20 years now. We have total dynamic reports including "creating your query components for current report" in "onBeforePrint" so we have >40 dynamic report pipelines which can be used within the reportbuilder itself to query the database + a lot more.

     

    You get very good support + bugfixes if they were reconstructable within 24 hours. 


  2. 1 minute ago, Stefan Glienke said:

    Well this still does not tell anything about how the list is being used, What their element type is or if they have a change notification attached (because all that influences the performance).

    I am asking because I have been spending quite some time looking into the rapid.generics code and the 10.3 system.generics.collections improvements and did some own for spring4d.

     

    And what makes testing with isolated (micro)benchmarks kinda difficult is the fact that often enough the hardware effect kicks in and shows you big differences that are just there in this benchmark but in real code completely irrelevant or even contradictory.

    I'm using System.Generics.Collections so far and was only interested in comparing my component with rapid.generics. My "small" benchmark does not say anything in detail but it shows, that the Rapid is doing create and free faster. 

    Before this can be used the source should be checked for threadsafe etc ... 

     

    Our component stores a lot of information in a "tDictionary<string, __Record>;" where the __Record is defined as 

        __Record = record
        public
            isObject, doFreeObject:boolean;
            vname:string;
            vname_original:string;
            vname_2, vname_3, vname_4:string;
            vwert:variant;
            vdescription:string;
            vcomponent:tobject;

            vdtstamp:tdatetime;
        end;

     

    Important to see was only the speed-difference on my machine, and it is a noticeable difference with Rapid.Generics so the programmer is doing something right in my opinion. 

    • Like 1

  3. 1 minute ago, Stefan Glienke said:

    Show the benchmark code please - I have seen so much flawed benchmarks (including some of my own) in the past months that I don't believe posted results anymore.

    Hi Stefan, 

    here's the code: 

    procedure TForm1.Button1Click(Sender: TObject);
    var
        vstart:tdatetime;
        vtest, i:longint;
        vtc:c__TriggerConstants;
    begin
        vtc:=c__tp(); // create my Generics-Collection-Component
        try
            Randomize;
            vstart:=now;
            for i:=0 to 1000000 do vtc.add('my'+inttostr(i), Random(10000000), '');
            memo1.Lines.add('> fill '+formatdatetime('hh:nn:ss:zzz', now-vstart)); vstart:=now;
    
            for i:=0 to 100000 do vtest:=vtc.getvalue('my'+inttostr(i), -1);
            memo1.Lines.add('> get sort '+formatdatetime('hh:nn:ss:zzz', now-vstart)); vstart:=now;
    
            for i:=0 to 100000 do vtest:=vtc.getvalue('my'+inttostr(random(100000)), -1);
            memo1.Lines.add('> get random '+formatdatetime('hh:nn:ss:zzz', now-vstart)); vstart:=now;
        finally
            freeandnil(vtc);
            memo1.Lines.add('> free '+formatdatetime('hh:nn:ss:zzz', now-vstart));
        end;
    
    end;

    And yes, i create 1.000.000 elements and later read only 100.000 .. 😉

     

    The code was compiled two times with switching directives:

    {$ifNdef mxHtScripter_RapidGenerics} System.Generics.Collections, {$else} Rapid.Generics, {$endif}

     


  4. I have tested my component for Generics-Collection with Tokyo 10.2.3 and Rio 10.3.1 with same results:

    Adding 100.000 data / read in order 0 to 100.000 / read 100.000 times random / free

     

    Tokyo: 1417ms / 59ms / 67ms / 234ms

    Tokyo with Rapid-Generics: 705ms / 49ms / 69ms / 26ms

     

    Rio: 1415ms / 59ms / 65ms / 230ms

    Rio with Rapid-Generics: 671ms / 51ms / 69ms / 26ms

     

    So the results between Tokyo and Rio are the same! But Rapid Generics is faster with adding (increment) and freeing (.clear)

    • Thanks 1

  5. 1 hour ago, Der schöne Günther said:

    Can't you just provide a simple test case with code that actually compiles, your input and your expected result?

    I've tried it today but with normal copy&paste of text the false offset in tMatch is not there, it is working. Only getting the text from tmyquery.fieldbyname('myclobfield').asstring forces the false offset in tRegEx.

    I think it has something todo with the encoding of the text from am CLOB (UNI) field in ElevateDB. Possible that we've searched for problem in tRegEx but it is in combination with ElevateDB.

    We're searching further. If we get a hit we'll post it here...


  6. On 1/18/2019 at 6:22 PM, FredS said:

     

    Certainly not executable code, you're using that function as input but never supply a TMatch parameter..

    But that code works perfect with 10.2.3. In my_RegExReplace i do result:=match.value and only if i have to replace something special i change result to whatever i need, this is ok, AFAIK.


  7. 17 hours ago, pyscripter said:

    Please provide runnable code.  What is the expected result? What is the result you get?

     

    Hi pyscripter, don't have time and ressources at the moment to create a demo from our code. We have switched back to Tokyo 10.2.3 and everything works again. If i have time next week, i will create a demo showing the problem in Rio. It seems that tRegEx is not working same as in tokyo!


  8. Hi All,

     

    does someone have also problems with Delphi Rio and tRegEx.Replace, it is the same as in following Rsp:

    https://quality.embarcadero.com/browse/RSP-19902

     

    I have installed all available patches and missing files for Rio but this problem still exists. Possible my Error and i don't see it? Same source works perfect with Delphi Tokyo 10.2.3:

     

    function my_RegExReplace(const Match: TMatch): string;
    var
    	vbasic, vfunktion, vwert:string;
    	vp1, vp2, vp3:string;
    	i:integer;
    begin
    	result:=match.value;
    	if match.value='' then exit;
    
    	vfunktion:=copy(match.value,1,pos('(',match.value)-1);
    	vwert:=copy(match.value, pos('(', match.value)+1, length(match.value));
    	vwert:=copy(vwert,1,length(vwert)-1);
    
    	if ansisametext(vfunktion, '.ResponseInfo.redirect') then result:='.ResponseInfo.redirect['+vwert+']';
    end;
    
    function my_RegEx_run_Replace(vScript, vBasicList, vBasicSuffix:string):string;
    var
    	vlist:tarray<string>;
    	i:integer; vname:string;
    begin
    	result:=vScript;
    	try
    		vlist:=vbasiclist.split([',']);
    		for i:=0 to length(vlist)-1 do begin
    			vname:=trim(vlist[i]);
    			if vname<>'' then begin
    				if pos(lowercase(vname), lowercase(vScript))>0 then begin
    					vScript:=tRegEx.Replace(vScript, vname+vBasicSuffix, my_RegExReplace, [roIgnoreCase, roMultiLine]);
    				end;
    			end;
    		end;
    		result:=vScript;
    	finally
    		setlength(vlist,0);
    	end;
    end;
    
    function my_replace(vsearch:string):string;
    begin
    	// try something like this: vsearch :='xxx xxxxxx.Responseinfo.redirect(blablup); xxxxx';
    	result:=my_RegEx_run_Replace(vsearch, '.S,.I,.O,.ResponseInfo.redirect', '((([^\(\)][,\-*\/])(([^\(\)]))[,*\-\/]*)+)');
    end;

     

×