The Web Part to List Projects with a Custom Field Value.docx article in the attached ListProjectsWebPart_JSGrid.zip is a draft of procedures that will be included in new articles in the next update of the Project 2010 SDK.
The column sorting functionality for the JS Grid is not implemented in the attached code sample. The next Project 2010 SDK download will include the complete code sample that implements sorting in the grid.
what is the performance impact of calling readproject for each project?
On project 2k7 I've had such loops take well over 10 minutes (not the alternative used in the end....)
Wouldn't it be more efficient to have an index on a text-type custom field (such as a hierarcy list)to work on a subset of the portfolio data? Querying two million tasks across a 1500-project portfolio, even in RDB, to identify similar values could be daunting and very time consuming. Hierarchical lookup lists are more compact.
Although not available in PS 2010, having additional breakdown structures to organize key company data would be even better. Each structure would have integrated indexing.
--John Andrew Kossey
The calls to ReadProject is done on the server in a PSI extension, and just for the projects that have the specified custom field value. That saves the overhead of making separate PSI calls from the client application, so the performance impact is minimal. It would be interesting to see a performance comparison using the same calls from the client and in the PSI extension, if someone would be able to do that. In addition, Project Server 2010 has implemented a number of performance improvements over Project Server 2007.
John -- the SPROC query in the ListProjects PSI extension is to MSP_EpmProject_UserView, and has nothing to do with tasks. Undoubtedly there are performance improvements that could be made; the SDK article shows the essential ideas. For the updated articles, see Developing PSI Extensions (msdn.microsoft.com/.../ff843378.aspx) and Developing Project Server Web Parts (msdn.microsoft.com/.../ff943563.aspx) -- and the subsections -- in the SDK.