Author | Topic: Slow ADS perfomance | |
---|---|---|
Jacob John | Slow ADS perfomance on Fri, 07 Sep 2018 13:56:55 +0530 Hi, We are using xBase 1.9 and ADS 11. The application was working perfectely alright. But it became slow 2 month back. For Example, It is taking 27 seconds to process 7000 records. Is this OK ? It is on client server environment. We tested in 4 LAN environment. But result is same. That means problem not because of hardware or its configuration. My DBESys() following PROCEDURE DBESYS() LOCAL cFreeConnect,oXml,cXMLContent,cIP,cPort,cShare PUBLIC oFSession If (File(DD_SETUP_PATH_XML)) cXMLContent:=MemoRead(DD_SETUP_PATH_XML) oXml :=xbXMLDocument():new(cXMLContent) * cIP :=oXml:getVar({"ECAMP","LOCATION","ADS","LAN_IP"}) cPort :=oXml:getVar({"ECAMP","LOCATION","ADS","LAN_PORT"}) cShare:=oXml:getVar({"ECAMP","LOCATION","ADS","SHARE_NAME"}) * cTheme:=oXml:getVar({"ECAMP","THEME" ,"ADS","THEME"}) * cFreeConnect:="DBE=ADSDBE;SERVER=\\"+cIP+":"+cPort+"\"+cShare+"\" Else cFreeConnect:="DBE=ADSDBE;SERVER="+CurDrive()+":;ADS_LOCAL_SERVER" EndIf * IF (! DbeLoad("ADSDBE")) MsgBox("ADSDBE not loaded" ) Quit ENDIF DbeSetDefault("ADSDBE") SET RIGHTS CHECKING OFF DbeInfo( COMPONENT_DATA , ADSDBE_RIGHTS_MODE, ADSDBE_IGNORERIGHTS ) DbeInfo( COMPONENT_DATA , ADSDBE_DICTIONARY_DATA,.F.) DbeInfo( COMPONENT_DATA , ADSDBE_TBL_MODE , ADSDBE_CDX ) DbeInfo( COMPONENT_ORDER, ADSDBE_TBL_MODE , ADSDBE_CDX ) DbeInfo( COMPONENT_DATA , ADSDBE_LOCK_MODE, ADSDBE_PROPRIETARY_LOCKING ) * oFSession := Open_New_ADS_Session(cFreeConnect) * Kiron 07/09/2018 DbeInfo( COMPONENT_DATA , ADSDBE_TBL_MODE , ADSDBE_ADT ) Kiron 07/09/2018 DbeInfo( COMPONENT_ORDER, ADSDBE_TBL_MODE , ADSDBE_ADT ) RETURN DbeSys() * FUNCTION Open_New_ADS_Session(cConnString) LOCAL oSession * IF (Empty(cConnString)) MsgBox("Connection String not defined...") Quit ENDIF * oSession := DacSession():New(cConnString) * If (! oSession:IsConnected()) MsgBox("Unable to establish connection to ADS"+Chr(13)+; "Error Code : "+Str(oSession:getLastError())+Chr(13)+; "Message : "+oSession:getLastMessage()+Chr(13)+; "ADS not found"+Chr(13)+; "Connection String : "+cConnString) Quit EndIf RETURN (oSession) * FUNCTION AX_GetConnectionType(nHandle) LOCAL nAdsDllHandle,nConnectionType:=0 * nAdsDllHandle:=DllLoad( ADSDLL ) DllCall(nAdsDllHandle,DLL_STDCALL,"AdsGetConnectionType",nHandle,@nConnectionType) DllUnLoad(nAdsDllHandle) RETURN (nConnectionType) Is this ok ? What should be the configuration of ADS for its best perfomance ? |