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