Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / May 2004

Tip: Looking for answers? Try searching our database.

Runs Slow The First Time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve Bishop - 21 May 2004 20:49 GMT
I have an application that uses data access that runs slow the first
time. My first page reads data from an ODBC source and the second page
hits a MSDE database. After each page opens the first time, they run
just fine.

What should I do? I have all my code in ASPX pages right now, but I
would like to break it up in some code behind. Also, is this the
advantage in pre-compiling data access classes (like in a dll or is
there an easier way)? Help appreciated. Thanks.
Steve
Jason Short - 21 May 2004 20:52 GMT
You should pre-compile into DLL's before sending it up to the server.  But
you will always have a JIT hit on the first access.  After that it will stay
in ram.

> I have an application that uses data access that runs slow the first
> time. My first page reads data from an ODBC source and the second page
[quoted text clipped - 6 lines]
> there an easier way)? Help appreciated. Thanks.
> Steve
Eric Marvets - 22 May 2004 03:34 GMT
It could be several things.

My first guess, since its not the first page (I would guess IIS initializing
itself as the problem is that were the case), put its the first time you hit
the datasource, is that the database takes a while to initialize itself.

Here is how you can check.  Turn on tracing.  Put Trace.Write statements
before and after calls to the database.  Look at the trace output to see the
time since last to see if there is a dramatic difference in the time between
the first page request and subsequent.  If there is a noticeable difference,
get a beafier database server.  If the database contains a huge amount of
data, loading the database initially could take some time.

JIT compilation does take time, but it should not be noticeable.  You can
precompile the assembly, but I would look elsewhere for the cause.

Signature

Eric Marvets
Principal Consultant

the bang project

<shameless self promotion>

Email sales@bangproject.com for Information on Our Architecture and
Mentoring Services

</shameless self promotion

Steve Bishop - 24 May 2004 16:16 GMT
Thanks for all the advice. I noticed this does run faster on a faster
server. Will try pre-compile as well as trace method.

Steve

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.