Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Problems with Large Folders

  Asked By: Larissa    Date: Feb 21    Category: Sharepoint    Views: 1405

When a folder in a document library contains a lot of files the time
it takes to retrieve information about a file takes an age.

As an example, I have about 4,000 files in one particular folder - it
takes 8-10 seconds to retrive the data contained in a custom column:


(file is an SPFile)

This seems very silly. Is there any way to speed this up?



4 Answers Found

Answer #1    Answered By: Harshini Raju     Answered On: Feb 21

Take a look at the Capacity Planning guide - it's recommended that you not
exceed 2000 documents or list items per folder  for exactly the reason you are

Answer #2    Answered By: Christop Mcfadden     Answered On: Feb 21

I've read the capacity planning guide, but it doesn't really help.

I'm storing about 50,000 documents, and they have already been split
up into different folders. I really don't want to have split them up
any further.

It really does seem very silly that you can't store more than only
2,000 documents in a folder  without experiencing slow-downs.

What is the reason for these slow-downs? All of the documents are
surely stored in the same database table regardless of which 'folder'
they are in?

Are there any known workarounds?

Answer #3    Answered By: Gopal Jamakhandi     Answered On: Feb 21

The limitation is in the underlying code that enumerates items in a folder  (so
you'll see it everywhere - OM, Web UI, Web Folders, etc), and the only
workaround is to not store more than 2k items per folder.

Answer #4    Answered By: Chantal Rosa     Answered On: Feb 21

I experimented this issue at length with a client. Basically we were
posting InfoPath document  to a form library  programmatically, after 1500
documents, the code the post was slowing down dramatically. We narrow
down the problem to the method

Add from the SPFileCollection class was the root of the problem

Microsoft gave us 2 suggestions:

1. split your form libraries in folders, we programmatically
created folder  for each day as forms were being added
2. Use a different method to post document, i.e. use the URL
protocol with FrontPage RPC or whatever (not really fun)

The limitation in the Add method is a bug that Microsoft should have
fixed. Basically we track down the stored procedure and for some unknown
reason, the code is issuing a full record locking on the records that
are part of the Docs table before inserting any document, which is
causing tremendous pressure on the SQL back end.

There are no workaround, just make sure that your document library
contains folders  if you want to exceed the 2000 document limit. BTW the
real limit is 2,000,000 documents per library

Didn't find what you were looking for? Find more on Problems with Large Folders Or get search suggestion and latest updates.