• 2 replies
  • Latest Post - ‏2010-10-18T19:24:55Z by bosox
532 Posts

Pinned topic Huge data service model

‏2010-02-04T14:28:06Z |
Hi I created a data service model which suddenly got huge with over 7MB.

Now this is something that really hinders my performance.
From what I've read models should not got over 500KB.

Now this model only has about 300 builders which is hundreds of builders
less than some of my other models which are well under the 1MB mark.

So while looking at the XML I found sections were being created in many
of my SQL CALL builders. This started with something like this:
<Input name="FetchEntityNames">Fetch Entity Names</Input>

Now this sections are fetching a bunch of schema information from my
development environment (Oracle Express Edition, i.e.XE). Therefore they
have hundreds of lines for each SQL CALL builder.

Is it safe to remove these or disable them?

Thank You
Updated on 2010-10-18T19:24:55Z at 2010-10-18T19:24:55Z by bosox
  • DGawron
    251 Posts

    Re: Huge data service model

    In the Database Explorer group of SQL Call use a more limited search pattern for the Entity Name. For example, don't just leave that input blank; rather, if you are looking for a table named EMPLOYEE, then simply use EMPLOYEE or EMP% to narrow down the set of returned names. This will in turn reduce the number of entity names stored in the model's XML. Hand editing the model's XML is not recommended. What I'd suggest is that you open the SQL Calls in the 7MB model and in each one search for some non-existent table. Then press Apply. This should remove the entries from the model.

    As an aside, a 300 builder model is considered huge. We generally recommend having no more than 50 or so builders per model. But you can often safely go over that if you organize the builders is a way that keeps the model maintainable.
  • bosox
    64 Posts

    Re: Huge data service model

    Wow, 300 builder calls is one of your smaller models? As DGawron points out, the suggested max is 50. This is just a guideline and you can often go over this without any issues, but 300 seems like that might be pushing things.

    DGawron's advice about the database explorer should be your first priority here, but also consider breaking this model into smaller models. It will make it easier for you to work on the model now and in the future if you need to come back to debug something or add an enhancement. Trying to sort through 50 builder calls to remember how something works is a lot easier than 300. Also, by breaking the service model into smaller maodels, you can reuse individual models as needed without having to pull a model with a set of 300 builders. This will allow things to perform better at design time for sure and in some cases at runtime too.