Jump to content

speed question


jlmontes@rauroszm.com

Recommended Posts

Hello, I Have a procedure to generate a bitmap (render GIS layers) , if execute this procedure in UNIGUI (web) it takes 12 seconds, If I execute this procedure in windows32 normal program it takes only  1.2 seconds.
this is normal?  

my question is, In general, code executed inside unigui enviroment is more slow???

 

I can't send source code because external libraries are necesary to run.

I' am using the last UNIGUI version and  DElphi Tokyo.

 

Thanks. 

 

 

 

Link to comment
Share on other sites

hum,

i thought the option ThreadStacksize of IsapiOptions but if your arre in standalone ot is not the problem.

the win32 version and unigui version are build with the same version of delphi ?

 

Like we can't see our code, it is difficult but when you generate bitmap,Have you got any code that can produce exchange between client side and server side that can expalin the slow function ?

Link to comment
Share on other sites

  • Administrators

 

Hello, I Have a procedure to generate a bitmap (render GIS layers) , if execute this procedure in UNIGUI (web) it takes 12 seconds, If I execute this procedure in windows32 normal program it takes only  1.2 seconds.
this is normal?  

my question is, In general, code executed inside unigui enviroment is more slow???

 

I can't send source code because external libraries are necesary to run.

I' am using the last UNIGUI version and  DElphi Tokyo.

 

Thanks. 

 

 

Hello,

 

In uniGUI your code runs normally like any other Delphi application. The only difference is that your code runs in threads different that MainThread of your app.

If there are many sessions doing same task then it can slow down your task, but again it shouldn't happen for a few session.

You can monitor your app CPU usage in VCL version and uniGUI version. Normally they should use same amount of CPU resources during bitmap generation.

Link to comment
Share on other sites

Hello Farshad, this code is 6/8 times slower than windows version, The code is a loop reading data from dbf database (Polygons) and painting with gdi+ on a bitmap.  

 

I'm in testing in developing mode, only one session executing.
 
 
        recs := Lyr.SearchShape(R, moAreaIntersect, Capa.Filtro);
        recs.MoveFirst;
        ir := 0;
        while (not recs.EOF) do
        begin
            flds := recs.Fields;
            shp := IMoPolygon(IDispatch(flds.Item('Shape').Value));
            if shp <> nil then
            begin
               if (Capa.TipoRender <> trnormal)
                then render:=Capa.DameRender(flds.Item(Capa.RenderField).ValueAsString)
                else  Render:=(Capa.DefaultRender);
 
               if Capa.SymbolType=moFillSymbol then
                Path := TGPGraphicsPath.Create;
 
               for i := 0 to shp.Parts.Count - 1 do
               begin
                 Points_a_GDI(view,imopoints(shp.Parts.Item(i)),@apoints);
                 if Capa.SymbolType=moFillSymbol then
                    Path.AddPolygon(aPoints)
                 else begin
                    PintaGDILine(aPoints,Render,Graph);
                 end;
               end;
               if Capa.SymbolType=moFillSymbol then
                 PintaGDIPath(path,Render,Graph,Capa.SymbolType);
            end;
            recs.MoveNext;
        end;
 
 
If you think it is strange, I can put the proyect  in a virtual machine and send us.
 
Thanks.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...