Re: Enterprise Library 3.1 - slow?
- From: xiong mao <xiong mao@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 13 Aug 2007 09:06:02 -0700
In reply to your points.
1) No it doesn't appear to be erroring out. The class does eventually load
(taking info from a datareader into the class properties) and displays in my
winform. I narrowed it down to adding/removing this line as to the place
where the slowness appeared. When i add this line, just stepping to the
Load() method takes the time.
2) Loading the class without the call to the database object simply loads my
businessobjects dll, symbols loaded and nothing more. Loading it with that
CreateDatabase line added, loads the following extras:
'ARESUI.vshost.exe' (Managed): Loaded
'C:\VSSWorking\dotNET\ARES\ARESUI\bin\Debug\Microsoft.Practices.EnterpriseLibrary.Data.dll', No symbols loaded.
'ARESUI.vshost.exe' (Managed): Loaded
'C:\VSSWorking\dotNET\ARES\ARESUI\bin\Debug\Microsoft.Practices.EnterpriseLibrary.Common.dll', No symbols loaded.
'ARESUI.vshost.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll',
Skipped loading symbols. Module is optimized and the debugger option 'Just My
Code' is enabled.
It loads these on the call to my this.Load() within the constructor of my
class. i.e as i step through the code it is on the this.Load() line NOT the
CreateDatabase() Line.
When the CreateDatabase Line is run it also loads the following:
'ARESUI.vshost.exe' (Managed): Loaded
'C:\VSSWorking\dotNET\ARES\ARESUI\bin\Debug\Microsoft.Practices.ObjectBuilder.dll', No symbols loaded.
The thread '<No Name>' (0x820) has exited with code 0 (0x0).
'ARESUI.vshost.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_32\System.Data.OracleClient\2.0.0.0__b77a5c561934e089\System.Data.OracleClient.dll', No symbols loaded.
'ARESUI.vshost.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_MSIL\System.Management\2.0.0.0__b03f5f7f11d50a3a\System.Management.dll', No symbols loaded.
I am using the compiled version of the framework dll as supplied by the
installation of the Enterprise Library, I originally used project references
to the Library so i could step through it and see what it was doing, but
don't feel the need to alter things so hoped the compiled version would be
fine for my needs.
3) Yes. It's SQL Server 2000. My Config file is as follows:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="dataConfiguration"
type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings,
Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
</configSections>
<dataConfiguration defaultDatabase="ARES"/>
<connectionStrings>
<add name="ARES" connectionString="Data Source=MyServer;Initial
Catalog=ARES;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
hope this helps!
"sloan" wrote:
.
I don't have that behavior, and I use the 3.x version all the time.
1. Are you sure its not erroring out? As in, the server doesn't exist, and
its maximizing the ConnectionTimeout property?
2. It is the (first call) OR second, third, Nth call? JIT compiling and
assembly loading. Look at the assemblies loading in the code window.
One thing I do in the code, is de-reference the Oracle reference/assemblies,
and comment out the Oracle (concrete) class, plus a few minor changes to
Assembly.cs I believe.
That can slightly help with assembly loadup time. But that shouldn't be our
issue anyways.
3. I'm assuming you're using Sql Server, since you used the DAAB in the
past. Post your .config file connection string information so the newsgroup
can see how you're setting up your connection strings.
"xiong mao" <xiong mao@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6DE8A3F7-906C-4BE8-B56A-9439B49FB5DC@xxxxxxxxxxxxxxxx
Seeing as it is being recommended as the successor to SqlHelper.cs, I am
trying to use the Data Access Application block from the Enterprise
Library.
My class works fine until i add the following line of code anywhere,
whereapon it runs incredibly slowly.
Database db = DatabaseFactory.CreateDatabase();
I understand that a database connection is a big resource, but it is
taking
a good 10 to 15 seconds to even step to the method within the class with
this
line in it, let alone run the line itself!
I hope it is simply a config issue i have overlooked, or i'll be sticking
with SqlHelper.
thanks in advance for any suggestions.
- Follow-Ups:
- Re: Enterprise Library 3.1 - slow?
- From: xiong mao
- Re: Enterprise Library 3.1 - slow?
- References:
- Re: Enterprise Library 3.1 - slow?
- From: sloan
- Re: Enterprise Library 3.1 - slow?
- Prev by Date: Re: gif as embedded resource
- Next by Date: Re: Rectangle = null?
- Previous by thread: Re: Enterprise Library 3.1 - slow?
- Next by thread: Re: Enterprise Library 3.1 - slow?
- Index(es):
Relevant Pages
|