0

I have cached access to either the Url or the GUID for multiple SharePoint site collections (SPSites), and I am trying to create new references to them for permissions purposes (SPSite constructor).

Is one constructor more efficient than the other for accessing them? Is there another significant difference I might want to take into account?

1

If you have them both cached, then I believe it just comes down to debuggability and visibility. It is easier to see what site you are working with when you construct with the url versus the GUID. I don't recall one being more performant over the other.

Personally, I would use the url so I know what I'm working with. You might be doing other things in the rest of your codebase that might make working with the GUID easier to understand and trace if necessary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.