Data Contract Diagram Performance Drops for Large Data Contract Diagram

Topics: Service Factory Modeling Edition Forum
Aug 13, 2008 at 7:32 PM
We have a large data contract diagram (about 250 contracts). The context sensitive menu (with the Generate Code item on it) takes 45s to appear after a right mouse click. What is the tool doing that is slowing it down and is there anyway we can stop it from doing it?

A related question is is there any support fo multiple data contract diagrams writing to the same project? We have not been able to find away to do this.
Aug 13, 2008 at 8:56 PM
Edited Aug 13, 2008 at 8:56 PM
Make sure you are using the latest version of the WSSF: Modeling Edition, which is the one published in the Releases section of this forum: . There was a known issue in the first version similar to the one that you describe.

Regarding multiple data contracts writing to the same project, you should be able to acomplish this by setting the same Project Mapping Table property for all of them. In case you would like to have several models writing to a same project, you can control this by editing the mapping file located at SolutionItems/ProjectMapping.xml. For instance, if you would like to generate the service code and data contracts code to the same project, you should apply both roles to the same project (provided that the each role is associated with only one project):



ProjectMapping ProjectId="211ba11b-d10c-48a8-800a-1b4dc73627c2" ProjectPath="\GeneratedCode" ProjectName="WCFService.DataContracts">
Role Name="DataContractRole" />
        <Role Name="ServiceContractRole" />


Aug 14, 2008 at 4:00 PM
The link points to version that states it is for VS2008. We are using VS2005. Can we use this version or is there a 2005 version with the fix you describe?
Aug 14, 2008 at 8:50 PM
This bug was only reported for VS2008, since this was not happening for VS2005. A possible workaround would be to split those 250 data contract into several DC models as you described in your first post and then make sure they are all pointing to the same Project Mapping Table.

Can you please provide some further feedback so we can add it to the known issue's description? For instance, it could be good to know whether this delay only happens when you right click the diagram or if it also happens when you save it or move shapes around.

Mar 11, 2010 at 5:01 PM

I'm noticing a similar issue in Visual Studio 2008 and am hoping someone can provide some suggestions on how to resolve.  I currently have about 90 tables in my data contract model and when I right-click to bring up the context menu to validate/generate code, the context menu takes a considerable amount of time to appear (usually 3-5 minutes).  I have noticed the performance of the context menu pop-up taking longer as I added more and more tables to my model.  This issue only seems to occur when right-clicking on the background of the data contract diagram.  If I right-click on a relationship line or an existing object, the context menu is displayed almost instantaneously.  

Is there another shortcut/menu option available to validate and/or generate the the data contract code other than using the right-click context menu?  

If not, I'm thinking I could get around this if I can create multiple data contract diagrams in my model and direct both of the data contract diagrams to place the generated code in the same DataContracts project in my service solution.  The key would be that the generated data contracts need to be within the same namespace and in the same project.  The code snippet from the ProjectMapping.xml file mentioned above shows how you can have the data contracts and service contracts generate to the same model, however in my case I need the opposite.

Any feedback would be appreciated.  Thanks!

Mar 11, 2010 at 5:31 PM

I did figure out how that I can create multiple data contract diagrams and have all of them add the generated code to the same project.  This will work as a work around for the performance issue with the right-click context menu, but I would like some feedback on that issue.


Mar 12, 2010 at 10:20 AM

Hi Derek,

Your work around is fine in terms of partiotioning the DC models to keep the total elements low in order to mitigate the perf issue. We are working on the VS2010 version which should solve that problem along with other features on this area. For the time being let me know if you can move forward with this temp solution until we release the next version anytime soon.



Mar 15, 2010 at 2:56 PM

Hi Hernan - 

Thanks for the feedback.  I pulled the entities in my data contract diagram out into three separate data contract diagrams and the performance is much better now.  This will work as a temporary solution for now.  When do you expect the VS2010 version of WSSF to be available?

Thanks again -

Mar 15, 2010 at 7:16 PM

It should be out right after VS10. Hopefully you may get a CTP to play with before that.