473,414 Members | 1,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

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 1558
You can use the NGEN (CLR Native Image Generator) utility for this.

http://msdn.microsoft.com/library/de...us/cptools/htm
l/cpgrfNativeImageGeneratorNgenexe.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********@nothing.com> wrote in message
news:eL**************@TK2MSFTNGP09.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/cpgrfNativeImageGeneratorNgenexe.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********@nothing.com> wrote in message
news:eL**************@TK2MSFTNGP09.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**********@BTInternet.com
Nov 20 '05 #3
* "TM" <no********@nothing.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
objMasterListDataSet.Clear()
objMasterListDA.FillSchema(objMasterListDataSet, SchemaType.Source,
"MasterList")
'fill dataset with info from dataAdapter
objMasterListDA.Fill(objMasterListDataSet, "MasterList")
'removed when deleted true dbgrid
'tdbgMasterItems.DataSource = objMasterListDataSet
'tdbgMasterItems.DataMember = "MasterList"
grdMasterItems.DataSource = objMasterListDataSet
grdMasterItems.DataMember = "MasterList"
' Create new Table Style.
Dim ts As New DataGridTableStyle
ts.MappingName = "MasterList"
grdMasterItems.TableStyles.Clear()
grdMasterItems.TableStyles.Add(ts)
' Assign New Width to DataGrid column.
grdMasterItems.TableStyles("MasterList").GridColum nStyles("Isle").Width = 50
grdMasterItems.TableStyles("MasterList").GridColum nStyles("Item").Width =
160
grdMasterItems.TableStyles("MasterList").GridColum nStyles("Isle").NullText =
"00"
grdMasterItems.TableStyles("MasterList").GridColum nStyles("Item").NullText =
" "
'set master list grid label to total number of records
updateMasterLabel()

code to load the second grid
-------------------------------------------
'clear dataset
objShoppingListDataSet.Clear()
objShoppingListDA.FillSchema(objShoppingListDataSe t, SchemaType.Source,
"ShoppingList")
'fill dataset with info from dataAdapter
objShoppingListDA.Fill(objShoppingListDataSet, "ShoppingList")
grdShoppingList.DataSource = objShoppingListDataSet
grdShoppingList.DataMember = "ShoppingList"
' Create new Table Style.
Dim ts As New DataGridTableStyle
ts.MappingName = "ShoppingList"
grdShoppingList.TableStyles.Clear()
grdShoppingList.TableStyles.Add(ts)
' Assign New Width to DataGrid column.
grdShoppingList.TableStyles("ShoppingList").GridCo lumnStyles("Isle").Width =
50
grdShoppingList.TableStyles("ShoppingList").GridCo lumnStyles("Item").Width =
160
grdShoppingList.TableStyles("ShoppingList").GridCo lumnStyles("Isle").NullTex
t = "00"
grdShoppingList.TableStyles("ShoppingList").GridCo lumnStyles("Item").NullTex
t = " "
grdShoppingList.TableStyles("ShoppingList").AllowS orting = False
'set shopping list grid label to total number of records
updateShoppingLabel()

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********@nothing.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********@nothing.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********@nothing.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.please.leadit.be> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
You can use the NGEN (CLR Native Image Generator) utility for this.

http://msdn.microsoft.com/library/de...us/cptools/htm l/cpgrfNativeImageGeneratorNgenexe.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********@nothing.com> wrote in message
news:eL**************@TK2MSFTNGP09.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********@nothing.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/cpgrfnativeimagegeneratorngenexe.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
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...
5
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...
23
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,...
3
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
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...
27
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...
12
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++...
4
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...
5
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,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.