cancel
Showing results for 
Search instead for 
Did you mean: 

Attach Statistics

TomBlackburn1
Level 7
Can anyone explain technically (in the background) how attach works? Is there any way to speed up the attach action? - Tom
5 REPLIES 5

TomBlackburn1
Level 7
Escentually what I'd love to know is the code behind attach to figure out how is recognises process and create a link between blue prism and the application. Then I can see if there is a way to optimise the time it takes to attach to a process

Denis__Dennehy
Level 15
Hello Tom, Are you saying that you have an appliaction that is very slow to attach? That is not usual, it should be very quick. Things to watch for might be: Do you have lots of applications open on your desktop that are not required for the automation? This could slow down attach, especially if you are only attaching based upon window title. Are you following best practice to have small objects (one for each funciton with the appliction). Sometimes loading large objects can be slow. I think behind the scenes it is probably doing something like trawling through the processes in system.diagnostics. So supplying the process name should speed up that attach - otherwise it would need to trawl through all processes currently running.

To Denis: I agree with Tom especially in case when SAP is involved and we use Window Title collection. Traversing all the window titles in the collection takes time which can be noticed - it takes measurable time (units of seconds) when you have like 5 witndow titles and you need to attach to the last one it may take up to 5 seconds. I may seem not too much but if you call it many times as to going through different SAP windows in one process it adds up. I rather use sending a variable Window Title to Attach page which is much faster. I don't know what Tom is referring to so if you can share more details, Tom, it may help.

TomBlackburn1
Level 7
One of the things I have noticed the 'attach' is lost upon exiting the object. Ok - this is understandable. Then the next object needs to re-attach to application. Ok - again, makes sense. However if I create and object for each screen of the application and if a process is to navigate through a selection of screens by pressing next, next, next etc. before pressing next each object needs to attach. I've tried to make this as natural as possible my calling attach in the initialise page. But the process bottlenecks seems to be in the constant attaching mechanism. Even though the only user visible application open is this application. I don't know what considerations may need to be looked at, but it would be nice to have to option to retain the attach relationship. Even if it can only be retained within an object layer. I.e if I create a 'component' that calls all these 'next' button actions from the various object. Thoughts? Advise?

Denis__Dennehy
Level 15
If you are attaching based upon a collection of potential window titles than the main recommendation to make this more efficient would be to have the most likely window to be found as the first row in the collection. If the window title you want to attach to is the last window title out of 5, then Blue Prism is first trawling through all the windows for all running processes four times before finally trying it for the actual window you want to attach to.