473,804 Members | 3,018 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to speedup program load

TM
I have a small application that displays records from an access mdb into two
datagrids and am looking to see if it is possible to speedup the loadtime
somehow.

In my formload I am filling my dataset and binding it to the datagrids. Is
there a better place to get my grids loaded and speed up the program
loadtime ?

Thanks
--
Tony


Nov 20 '05 #1
8 1587
You can use the NGEN (CLR Native Image Generator) utility for this.

http://msdn.microsoft.com/library/de...us/cptools/htm
l/cpgrfNativeImag eGeneratorNgene xe.asp
The Native Image Generator creates a native image from a managed assembly
and installs it into the native image cache on the local computer. The
native image cache is a reserved area of the global assembly cache. Once you
create a native image for an assembly, the runtime automatically uses that
native image each time it runs the assembly. You do not have to perform any
additional procedures to cause the runtime to use a native image. Running
Ngen.exe on an assembly allows the assembly to load and execute faster,
because it restores code and data structures from the native image cache
rather than generating them dynamically.
--
Greetz

Jan Tielens
_______________ _______________ __
Read my weblog: http://weblogs.asp.net/jan
"TM" <no********@not hing.com> wrote in message
news:eL******** ******@TK2MSFTN GP09.phx.gbl...
I have a small application that displays records from an access mdb into two datagrids and am looking to see if it is possible to speedup the loadtime
somehow.

In my formload I am filling my dataset and binding it to the datagrids. Is there a better place to get my grids loaded and speed up the program
loadtime ?

Thanks
--
Tony

Nov 20 '05 #2
Alternatively, it may be worth looking at a DataReader to get the data from
your Database into the DataSet/Table

OHM#

Jan Tielens wrote:
You can use the NGEN (CLR Native Image Generator) utility for this.

http://msdn.microsoft.com/library/de...us/cptools/htm l/cpgrfNativeImag eGeneratorNgene xe.asp
The Native Image Generator creates a native image from a managed
assembly and installs it into the native image cache on the local
computer. The native image cache is a reserved area of the global
assembly cache. Once you create a native image for an assembly, the
runtime automatically uses that native image each time it runs the
assembly. You do not have to perform any additional procedures to
cause the runtime to use a native image. Running Ngen.exe on an
assembly allows the assembly to load and execute faster, because it
restores code and data structures from the native image cache rather
than generating them dynamically.

"TM" <no********@not hing.com> wrote in message
news:eL******** ******@TK2MSFTN GP09.phx.gbl...
I have a small application that displays records from an access mdb
into two datagrids and am looking to see if it is possible to
speedup the loadtime somehow.

In my formload I am filling my dataset and binding it to the
datagrids. Is there a better place to get my grids loaded and speed
up the program loadtime ?

Thanks
--
Tony


Regards - OHM# On**********@BT Internet.com
Nov 20 '05 #3
* "TM" <no********@not hing.com> scripsit:
I have a small application that displays records from an access mdb into two
datagrids and am looking to see if it is possible to speedup the loadtime
somehow.

In my formload I am filling my dataset and binding it to the datagrids. Is
there a better place to get my grids loaded and speed up the program
loadtime ?


Post some code...

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
TM
Ok, here is the code I am using to load my grids. I have two datagrids.
code to load the first grid
--------------------------------------
'clear dataset
objMasterListDa taSet.Clear()
objMasterListDA .FillSchema(obj MasterListDataS et, SchemaType.Sour ce,
"MasterList ")
'fill dataset with info from dataAdapter
objMasterListDA .Fill(objMaster ListDataSet, "MasterList ")
'removed when deleted true dbgrid
'tdbgMasterItem s.DataSource = objMasterListDa taSet
'tdbgMasterItem s.DataMember = "MasterList "
grdMasterItems. DataSource = objMasterListDa taSet
grdMasterItems. DataMember = "MasterList "
' Create new Table Style.
Dim ts As New DataGridTableSt yle
ts.MappingName = "MasterList "
grdMasterItems. TableStyles.Cle ar()
grdMasterItems. TableStyles.Add (ts)
' Assign New Width to DataGrid column.
grdMasterItems. TableStyles("Ma sterList").Grid ColumnStyles("I sle").Width = 50
grdMasterItems. TableStyles("Ma sterList").Grid ColumnStyles("I tem").Width =
160
grdMasterItems. TableStyles("Ma sterList").Grid ColumnStyles("I sle").NullText =
"00"
grdMasterItems. TableStyles("Ma sterList").Grid ColumnStyles("I tem").NullText =
" "
'set master list grid label to total number of records
updateMasterLab el()

code to load the second grid
-------------------------------------------
'clear dataset
objShoppingList DataSet.Clear()
objShoppingList DA.FillSchema(o bjShoppingListD ataSet, SchemaType.Sour ce,
"ShoppingLi st")
'fill dataset with info from dataAdapter
objShoppingList DA.Fill(objShop pingListDataSet , "ShoppingLi st")
grdShoppingList .DataSource = objShoppingList DataSet
grdShoppingList .DataMember = "ShoppingLi st"
' Create new Table Style.
Dim ts As New DataGridTableSt yle
ts.MappingName = "ShoppingLi st"
grdShoppingList .TableStyles.Cl ear()
grdShoppingList .TableStyles.Ad d(ts)
' Assign New Width to DataGrid column.
grdShoppingList .TableStyles("S hoppingList").G ridColumnStyles ("Isle").Wid th =
50
grdShoppingList .TableStyles("S hoppingList").G ridColumnStyles ("Item").Wid th =
160
grdShoppingList .TableStyles("S hoppingList").G ridColumnStyles ("Isle").NullTe x
t = "00"
grdShoppingList .TableStyles("S hoppingList").G ridColumnStyles ("Item").NullTe x
t = " "
grdShoppingList .TableStyles("S hoppingList").A llowSorting = False
'set shopping list grid label to total number of records
updateShoppingL abel()

I appreciate any help
--
Tony

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:br******** ****@ID-208219.news.uni-berlin.de...
* "TM" <no********@not hing.com> scripsit:
I have a small application that displays records from an access mdb into two datagrids and am looking to see if it is possible to speedup the loadtime somehow.

In my formload I am filling my dataset and binding it to the datagrids. Is there a better place to get my grids loaded and speed up the program
loadtime ?


Post some code...

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #5
* "TM" <no********@not hing.com> scripsit:
Ok, here is the code I am using to load my grids. I have two datagrids.
code to load the first grid


Thanks. How many rows are you loading? 100? 1,000? 1,000,000?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #6
TM
The shopping grid will generally only have about 40 rows. The master grid
has about 500

--
Tony

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:br******** ****@ID-208219.news.uni-berlin.de...
* "TM" <no********@not hing.com> scripsit:
Ok, here is the code I am using to load my grids. I have two datagrids.
code to load the first grid


Thanks. How many rows are you loading? 100? 1,000? 1,000,000?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #7
TM
Sorry, but when I try and access the page you gave me, I get a page not
found

--
Tony

"Jan Tielens" <ja*@no.spam.pl ease.leadit.be> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
You can use the NGEN (CLR Native Image Generator) utility for this.

http://msdn.microsoft.com/library/de...us/cptools/htm l/cpgrfNativeImag eGeneratorNgene xe.asp
The Native Image Generator creates a native image from a managed assembly
and installs it into the native image cache on the local computer. The
native image cache is a reserved area of the global assembly cache. Once you create a native image for an assembly, the runtime automatically uses that
native image each time it runs the assembly. You do not have to perform any additional procedures to cause the runtime to use a native image. Running
Ngen.exe on an assembly allows the assembly to load and execute faster,
because it restores code and data structures from the native image cache
rather than generating them dynamically.
--
Greetz

Jan Tielens
_______________ _______________ __
Read my weblog: http://weblogs.asp.net/jan
"TM" <no********@not hing.com> wrote in message
news:eL******** ******@TK2MSFTN GP09.phx.gbl...
I have a small application that displays records from an access mdb into

two
datagrids and am looking to see if it is possible to speedup the loadtime somehow.

In my formload I am filling my dataset and binding it to the datagrids.

Is
there a better place to get my grids loaded and speed up the program
loadtime ?

Thanks
--
Tony


Nov 20 '05 #8
* "TM" <no********@not hing.com> scripsit:
Sorry, but when I try and access the page you gave me, I get a page not


This link should work:

<http://msdn.microsoft. com/library/en-us/cptools/html/cpgrfnativeimag egeneratorngene xe.asp>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2311
by: andrewpalumbo | last post by:
I'm trying to write some code which will split up a vector into two halves and run a method on the objects in the vector using two seperate threads. I was hoping to see a near linear speedup on an SMP machine, but I'm finding that the code below takes almost exactly the same amount of time as when I iterate through the vector, and don't use any threads at all (using only one processor). I'm running this on a Dual Athlon machine under...
5
1511
by: Ognen Duzlevski | last post by:
Hi all, I have rewritten a C program to solve a bioinformatics problem. Portion where most of the time is spent is: def DynAlign(scoremat,insertmat,delmat,tseq,qseq,tlen,qlen): global ONEINDELPENALTY,OPENGAPPENALTY for ndx1 in range(1,tlen+1): for ndx2 in range(1,qlen+1): delmat = Min(delmat+ONEINDELPENALTY, \
23
2647
by: Mark Dickinson | last post by:
I have a simple 192-line Python script that begins with the line: dummy0 = 47 The script runs in less than 2.5 seconds. The variable dummy0 is never referenced again, directly or indirectly, by the rest of the script. Here's the surprise: if I remove or comment out this first line, the script takes more than 15 seconds to run. So it appears that adding a redundant line produces a spectacular six-fold increase in speed!
3
4703
by: Arti Potnis | last post by:
Hi, I am trying to execute the DB2 load utility from a C program. lPid = fork(); execl(csExePath, csExeName,csCmd, NULL); the contents of the parameter variables are as follows:-
0
1401
by: internetmike | last post by:
I have a client database with a parent form and a tab control on the child form for all my child tables, such as Enquiry, Application, Journal, etc. I am trying to design a "dashboard" panel in the top left corner with a text box containing a single letter for each tab, E A J. I have conditional formatting for each text box that changes the single letter to red if there is the client parent key is in the child table, using the following...
27
2085
by: cj | last post by:
I run this program and to exit click the X in the upper right corner. But apparently it isn't really ending the program. If I return to VB and make changes then try to rebuild the app it says the exe is still in use--I find it is still a process in Task Manager. What do I need to do to make clicking that X actually end the program? Public Class Form1 Inherits System.Windows.Forms.Form
12
2328
by: Lars Schouw | last post by:
All, Does anyone know how much performance speedup I can expect by using 64 bit C++ / Windows XP 64 bit over the 32 bit versions? Did anyone test this under Visual Studio 2005 or Intel C++ 8.1/9.0 ? My application domain is montecarlo simulations but any test would be great.
4
1664
by: Galen Somerville | last post by:
My VB2005 app gets real time Heart sounds and an ECG from a USB device. I'm looking for a way to speed up the drawing of the traces on the screen. In the following code the routine GetSounds recieves the USB data for six consequtive horizontal pixels (or 6 sound/ECG samples). The routine FixChns handles the scaling of the data and puts it into the PlotAry for presentation. The variable RptCnt then handles the placement for the 6 sets...
5
1057
by: Johnny Blonde | last post by:
Hello Group! I really tried hard for two hours to rewrite the following expression (python 2.4): -------------------------- teilnehmer = for r in Reisen.select(AND(Reisen.q.RESVON <= datum, Reisen.q.RESBIS for g in r.BUCHUNGEN: for t in g.aktiveTeilnehmer: teilnehmer.append(t)
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9152
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7620
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.