As it turns out, the delay caused no problem whatsoever! While it again worked without issue, it seemed to be taking a long while.I suspect this to be due Share Point's heavy use of long running operation code block (SPLong Operation). I thought it may have been due to the concurrent file upload and web browser refreshing (so I could roughly confirm the correct delay)...Changes are tracked from the PREVIOUS set of properties (so Before vs After within same event, After from current event vs Before from previous event).First event received : Item Adding Conclusions It appears that the Item Adding event just prepares the filesize metadata. The first Item Updating seems to add a lot of data...I attached and checked the properties parameter, but quickly realized that I need a helper to handle all of the metadata.Metadata helper code: This code generates a string of all metadata keys and values, both before and after the event receiver.
because of the potential execution time (initial testing showed 20 seconds as a possibility), I wanted to find out what would happen if event receivers are time consuming. Since I wanted to be able to adjust the time quickly, I used the SPWeb propertybag.I attached the debugger, added my breakpoints, and called this in the watch window...here's what I found: represents deleted keys (which is why they have no values).Testing Methodology To get results as quickly as possible, I threw together a basic event receiver which called System. Since I didn't want to waste time writing an application page to control this event receiver (which is going to be thrown away eventually, anyway), I used Power Shell to adjust the duration of sleep.
The event receiver code: Testing and Results Web Interface So I uploaded files using the web interface, using various delays from 5 seconds all the way up to 45 seconds.
it adds the file size (64 bytes), and also seems to create a file lock.