SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to know the fastest way to access a list. Would it be:

            SPWeb web = site.RootWeb;
            SPList activityListFromUrl = web.GetList("/Lists/ActivityList");


            SPWeb web = site.RootWeb;
            SPList activityListFromGuid = web.Lists[new Guid("aaa-aaa-aaa-aaa")];

or perhaps some other way?

share|improve this question
Duplicate of… – Andy Burns Mar 29 '12 at 17:13
Its not a duplicate, I posted both those questions and I believe they are asking different things. This is regarding speed, the other is regarding general benefits of using a Guid vs a Title or URL. – Meyer Denney Mar 29 '12 at 17:50
up vote 12 down vote accepted

web.Lists[guid] is the fastest.

web.GetList(url) calls a couple of methods to get the guid and then returns web.Lists[guid]

share|improve this answer
web.Lists[guid] - is not fastest. For some reason, TryGetList is faster! – Aviw Apr 29 '14 at 5:30

The only way to definitively answer "faster" type questions is to test in your environment.

Your farm (hardware, network, etc.) is going to be different than everybody else. So any advice you get will not apply to your configuration.

share|improve this answer
Does web.Lists[guid] load all the site lists into memory before accessing it like web.Lists.TryGetList() does? – Meyer Denney Mar 29 '12 at 16:11
No matter the answer to the question, performance can only be measured by doing actual measurements. (And the answer could be determined by reflecting those methods.) – Paul Schaeflein Mar 29 '12 at 19:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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