water

AD UDF - Performance improvements

4 posts in this topic

When working on the new function _AD_GetObjectOU (returns the OU of a user, group, computer etc.) I noticed the big performance advantage you get when using ADsPath.

(example: processing 120 users to retrieve the OU takes 207ms compared to 1041ms - so it is about 5 times faster).

At the moment functions either accept SamAccountName or FQDN as parameters to identify an AD object.

Where would you benefit?

It takes a lot fo time when you use _AD_GetObjectsInOU to retrieve objects fitting the search pattern and then need to loop through the resulting array calling _AD_GetobjectProperties for each object to retrieve additional properties.

By using ADsPath this should run much faster.

But it needs

  • me to modify a lot of functions in the AD UDF to accept ADsPath as a parameter
  • you to change your script

What do you think? Is it worth the effort.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

An increase of 5x speed is always worth a minor script modification on my part, in my humble opinion.

Edited by JLogan3o13
1 person likes this

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

I think I will modify functions_AD_GetObjectAttribute and _AD_GetObjectProperties for everyone to test some common cases like: Search for all users in department x and retrieve the lastlogon date each.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I would definitely welcome it, I use your UDF for most of what I do, it has been a godsend and shaving off time here and there is always good :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now