jlmontes@rauroszm.com Posted January 29, 2018 Share Posted January 29, 2018 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. Quote Link to comment Share on other sites More sharing options...
jlmontes@rauroszm.com Posted January 29, 2018 Author Share Posted January 29, 2018 The procedure don't have any interaction with UI, is a backgroud process. Quote Link to comment Share on other sites More sharing options...
delagoutte Posted January 29, 2018 Share Posted January 29, 2018 what mode are you using for unigui when you have this low speed : standalone or isapi or both? Quote Link to comment Share on other sites More sharing options...
jlmontes@rauroszm.com Posted January 29, 2018 Author Share Posted January 29, 2018 Standalone. Quote Link to comment Share on other sites More sharing options...
delagoutte Posted January 29, 2018 Share Posted January 29, 2018 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 ? Quote Link to comment Share on other sites More sharing options...
jlmontes@rauroszm.com Posted January 29, 2018 Author Share Posted January 29, 2018 Thanks, I'll try find code that can produce exchange between client side an server side. Quote Link to comment Share on other sites More sharing options...
jlmontes@rauroszm.com Posted January 29, 2018 Author Share Posted January 29, 2018 The problem is coming when comunicate with external DLL, but the external dll only access to dbf file. This is the line that access to dbf IMoPolygon(IDispatch(flds.Item('Shape').Value)); Any sugestion? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted January 29, 2018 Administrators Share Posted January 29, 2018 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. Quote Link to comment Share on other sites More sharing options...
rgreat Posted January 29, 2018 Share Posted January 29, 2018 I found that IASPI DLL's have some extra limitations in area of pointer based memory access. for example Graphics32 library sometimes raise errors under IIS management. Quote Link to comment Share on other sites More sharing options...
jlmontes@rauroszm.com Posted January 30, 2018 Author Share Posted January 30, 2018 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.