What Are Things Vbc.exe Does When /optimize Switch Is Used

Mar 6, 2012

vbc.exe has something called /optimize switch right. If I enable that what are the optimizations the compiler can do for me? The MSDN documentation just curtly says 'does various compiler optimizations'. Where can I find the complete quantified view of the different optimizations that actually goes into.Here is the thing I am pursuing this route. One of the code blocks in a module I am leading has a lot of delimited array manipulations. I believe this is going to be a heck costly in terms of string memory handling. I am looking to see if I can retire them by way of simple properties or methods so that the compiler can internally do something like our c++ inline functions making a best win-win offer in terms of both memory and processing time. I admit when the compiler translates them as inline function, the JITed code might be big in size right?

View 7 Replies


ADVERTISEMENT

Making Different Things Happen Depending On If Things Have Been Set?

Jun 17, 2012

If NewEntryName.Text = "" And OpenFileDialog1.FileName = Nothing Then MsgBox("Please choose a name for your game.", vbExclamation) MsgBox("Please find your game.", vbExclamation) Else Button1.Text = NewEntryName.Text

[code].....

View 1 Replies

Optimize Waypoints For More Than 25?

Sep 10, 2010

I need to order lists of up to 100 addresses in optimized order. Is there a way to do this since getdirections is limited to 25? i don't se any way around this 25 limit. Is there one I'm missing?

No I'm trying to use MapPoint object model but it crashes as well with this many waypoints. Here is my example proof of concept code from Excel:

Sub OptimizeRoute()
Dim objApp As Object 'New MapPoint.Application
Dim objMap As Object 'MapPoint.Map

[Code]....

View 2 Replies

Way To Optimize My Algorithms

Sep 28, 2009

I had been working on a project that would generate a loan schedule.

But, It needs to factor in specified holidays and weekends.

Now, when running with a small 'term', it seems to work fine.[code]...

View 14 Replies

Will The Compiler Optimize This

Mar 8, 2012

Consider this

bar = 1
foo = <1 or 2, depending on previous code>
if foo=1
while bar <= 5

[code].....

What I want to know is, is the compiler smart enough to optimize away the (apparently) repeated tests for "foo = 1" since foo is not modified in the body of the loop?If so, I might use the second construct since it is semantically equivalent (I think!), takes less code and reduces indentation levels.

View 6 Replies

Optimize Linq Contains Method

Apr 1, 2012

I need a list from OldGuids that are not in the NewGuids, so I used the Contains method, the problem is that it is already running more then half hour, is there a faster way? or how much longer would it take about? [code]

View 2 Replies

Optimize Ms Access On Network?

Nov 1, 2010

Is it possible to use a string as an array? I mean:' I have several arrays

Dim a10() As Integer = {530}
Dim a15() As Integer = {370, 231}
Dim a20() As Integer = {305, 176, 126}

'I declare a variable as a string and I assign the name of an array to it

Dim tablaalfa As String = "a10"

'I retrieve data from the array using the name of the variable instead:

lbl1.Text = tablaalfa(2)

I guess it doesn't work in this way?

View 3 Replies

.net - Optimize This Simple But Horrible Implementation?

Jul 27, 2011

I basically want to remove the formula from the cells but want to retain the calculated values.

SO, I implemented it easily and it works great but REALLY SLOW. (About 2 mins for 1800 cells)

I have : Dim col As Excel.Range = getRange()For Each cell In col cell.Value = cell.Value Next

I tried to do this to the first cell and then autofill the rest, but that copied the value of 1st cell to the rest of the cells in column.

View 7 Replies

How To Optimize Simple But Complex Looking Implementation

Jul 28, 2011

Want to dump a fetched table to a excel sheet. [code] I am new to data fetching and ADO.Net concepts and just got it working.But. This seems to be very inefficient and lame to me. So, can you help reducing the complexity and may be improve performance ? A totally different (Better) implementation is most welcome !

View 2 Replies

Optimization :: Optimize Own Code Written?

Jan 20, 2011

How can I Optimize my own code written by VB.net? Is there any tools for it? Does Visual Studio have any one? What's your suggestion? I use VS2008 as my editor.

View 1 Replies

Optimize Classes Before Serializing And Saving

Oct 24, 2010

Often it is very usefull to save data as a class by serialize and compress it. From few experiments I have noticed that
Class A
Public name as string
Public List as new list(of string) <---- empty
End Class

Class B
Public name as string
Public List as list(of string) <----- not instantiated
End Class

If I serialize and compress the 2 classes the class B uses less spaces once serialized and compressed. This suggests me that if a class contains a list that is instantiated but empty it is better to set that to nothing and reset as new when it is decompressed and deserialized. Is there any dll that optimizes a class to be stored (serialized and compressed) and restore it when it is decompressed and deserialized?

View 6 Replies

Simplify And Optimize This Checksumming Code?

Jan 27, 2011

Public Function CalCheckSum(ByVal ByteList As List(Of Byte)) As List(Of Byte)
Dim total As Integer = 0
For Each b As Byte In ByteList

[code]....

View 1 Replies

Copy Selected Listview Items To Another (optimize)?

Oct 28, 2009

I fairly new to .Net. I did a small project a year or so ago but haven't coded in it since. I'm picking up maintenance of a project where items are selected from one listview and copied to another removing the selected item from the "parent". The current code is in two steps:1. Get the selected items removing from sender:

Public Function GetSelectedItems(Optional ByVal pRemoveFromList As Boolean = False) As ListView
Dim mList As New ListView

[code].....

View 4 Replies

Forms :: Optimize Code And Lower CPU Usage?

May 14, 2009

When my form first loads, it runs at about 30k CPU, but after about 10 minutes of use, it goes up to (and stays at) about 70k CPU.

What ways can i optimize my code to allow the CPU usage to stay low, or how can i lower it during the running of the program.

My most concerned areas of the CPU are:

1. I have a web browser, and when a user types in a url and presses go or enter, the CPU jumps about 4k:

Private Sub Go_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Go.Click
WebBrowser1.Navigate(OldURL.Text)

[Code]....

The second worry is when i open other forms, it boosts the CPU up aswell. the only code for this is:

Form.Show()

View 1 Replies

Optimize Loop Through Lines Of MultiLine Textbox?

Oct 11, 2008

I 'm currently developing program which I can check the lines of each textbox if it has same length. The code is working properly in few lines like 2000 lines, but when I try to load a textfile which has 50,000 lines, my program is not responding anymore it takes forever. [code]...

View 7 Replies

Optimize The Code For Copying Data From One Dataset To Another?

Oct 6, 2009

this is in reference to my main post here update mdb with data from different tables in dataseti have two tables in a dataset called dsSource. dsSource.Tables(0) has the following columns: ,,,,,,,code,art,sizerng1,sizerng2,sizerng3,etc...... dsSource.Tables(1) has the following columns: ,,,,,,,code,art,size1,size2,size3,etc...... the conditions here are: 1) to look for "1" in columns sizerng1, sizerng2, etc. of dsSource.Tables(0) 2) match code and art on both tables finally if both conditions are valid then the size values in columns size1, size2, etc. will be assigned to columns in sizerng1, sizerng2, etc. my main concern here is i have to loop through all rows in both tables which takes a long time, so is there a better way to do this than the code i have below?.

'***put the sizes from weights to traps file
row1 = 0
For Each dr As DataRow In dsSource.Tables(0).Rows

[code].....

View 8 Replies

VS 2008 : Optimize Recursive Treeview With AddRange?

Jun 23, 2009

I have this seperate class to fill a treeview from my database.There are over 33000 records and when this class runs, it takes almost 1 minute to finish.When i run this query from the server it takes for 5 seconds to retrieve all items.Is there a way to optimize this class?

Option Explicit On
Option Strict On
Imports System.Windows.Forms

[code]....

View 19 Replies

C# - Does The JIT Compiler Optimize (inline) Unnecessary Variable Declarations

Oct 20, 2011

I've read several articles and questions/answers that conclude the best practice is to let the JIT compiler do all the optimization for inline function calls. Makes sense. What about inline variable declarations? Does the compiler optimize these as well?

[Code]...

Of course I prefer the latter because it's easier to read and debug, but I can't afford the performance degradation if it exists. I have already identified this code as a bottleneck -- No need for retorts about premature optimization.

View 2 Replies

DB/Reporting :: Optimize Query (aggregates On Multiple Tables)?

Feb 20, 2008

Code:

Tables:
- Company
- Department
- Employee
- CertificationA
- CertificationB

I am trying to return a recordset that gives some summary information about each company. The fields in my returned recordset should look like the following.

Company.Name, NumberOfDepartments, NumberOfEmployees, NumberOfCertificationA, NumberOfCertificationACompleted, NumberOfCertificationB, NumberOfCertificationBCompleted

There are actually about 10 different Certification tables but, with Certification A and B you should get the hang of it. When an employee starts a certifaction, a record is added to the that certification table.Below is a query I wrote that works (gets me the data I need), but I am unsure if it is the most efficient way. There will be quite a lot of data so performance is an issue.

Code:

Dim sqlNumberOfDepartments As String
sqlNumberOfDepartments = _
"(SELECT COUNT(*) " & _
"FROM DEPARTMENT " & _

[code].....

View 1 Replies

Optimize LINQ Query For Use With JQuery Auto-complete?

May 20, 2010

I'm working on building an HTTPHandler that will serve up plain text for use with jQuery Autocomplete. I have it working now except for when I insert the first bit of text it does not take me to the right portion of the alphabet.[code]...

My question is, how would I implement this concept into my HTTPHandler without doing a fresh SQLQuery on every character change? IE: I do the SQL Query on the QueryString("ID"), and then on every subsequent load of the same ID, we just filter down the "Part".[url]...

View 2 Replies

Optimize Linq To SQL Query, Group By Multiple Fields

Jul 26, 2010

My LINQ query contains the following Group By statement:

Group p By Key = New With { _
.Latitude = p.Address.GeoLocations.FirstOrDefault(Function(g) New String() {"ADDRESS", "POINT"}.Contains(g.Granularity)).Latitude, _
.Longitude = p.Address.GeoLocations.FirstOrDefault(Function(g) New String() {"ADDRESS", "POINT"}.Contains(g.Granularity)).Longitude}

The query works, but here is the SQL that the clause above produces

SELECT [t6].[Latitude]
FROM (
SELECT TOP (1) [t5].[Latitude]

[Code]....

but this produced an error: "A group by expression can only contain non-constant scalars that are comparable by the server."

View 1 Replies

.net : Changing Certain Things To URL?

Aug 4, 2011

Like the browser url is

[URL]

how can i change when button press it will change the url: [URL]to : [URL]it will change M. to WWW.

View 2 Replies

Compare Things From Xml?

May 18, 2010

I'm trying to compare values from a single xml file.

Here is my xml file set up

<?xml version="1.0" encoding="utf-8"?>
<Updater>
<version>

[Code].....

View 11 Replies

Difference Between These Two Things?

Jun 15, 2011

When people use if statements on booleans, they either do this

if booleanStatement = true then
if booleanStatement then

I know that they both accomplish the same thing, but is one better than the other? Outside of 'good programming etiquette'

View 2 Replies

How Many 'odd Things' Happen

Jun 27, 2012

After developing using the Excel Interop with .Net for a while, i have become increasingly annoyed with the how many "odd things" happen - such as this question i posted earlier.

View 6 Replies

How To Email Things In VB

Nov 15, 2011

Im 16 and have been working with Vb for a few months when i have time. I am trying to make a text box that when the user of the program types into it what they have typed will be sent to my email with a push of a button...Im having alot of trouble because i dont know how to do this.

View 1 Replies

Scrolling Two Things At Once?

Jan 19, 2009

I want to make it so when I scroll down on one listbox view, it will do the same on the other one. How do I do that? I have one listbox that lists usernames, and the other one that does the message... so we don't have to worry about one having a longer height than the other one.

View 7 Replies

Assigning New Things To An Image?

May 1, 2010

OK, Well I'm creating a "Card" creating app. The app will let you type in the name you want in the name field and then select a picture. But the problem is, is the saving. I want the card to be transparent like the original. The original is just a blank card. And theres a picturebox on the form that shows the original transparent image, and then a label over the name tag part of the original transparent image, and then another picturebox over the original pictures box for the picture, everything works for designing and it looks great after your done designing the card. But saving will not be transparent and it will not blend with the background.

How do I add onto the image and still keep the transparency of the original and then save it?

This is my code:

Label1.SendToBack()
PictureBox2.SendToBack()
Dim Card As New Bitmap(Panel1.Width, Panel1.Height)

[Code]....

View 1 Replies

C# - Generating Excel Through .Net Doing Odd Things?

Feb 4, 2010

I have a rather odd thing happening with an Excel WorkSheet that I am creating through .Net.I load up an existing workbook

Dim _xlApp As New Excel.Application
Dim _xlWorkbook As Excel.WokBook = _xlApp.Workbooks.Open(_templateFileName)

set it to be visible before populating it (for debugging purposes)

_xlApp.Visible = True

I then go on to populate the existing template.

Private Sub GenerateOceanFreightGrid()
Dim columnCount As Integer = 4 ' _standardColumnCount
Dim columnInsertPosition As Integer = 5

[code]....

When i set a breakpoint on the "Private Sub Gen.." line, and step through the code line by line, it inserts a new column for each variable declared, so in this case it will insert two columns before it even hits the "If MyBooleanValue()..." line (I can watch it actually happen due to the Excel app being visible). However, if i dont set a breakpoint and just let the code run straight through this doesnt happen.There is no multi threading happening or anything else that i suspect would have any impact on the code.

View 1 Replies

Drag And Drop Things?

Apr 1, 2009

I am wondering if it is possible to drag and drop a control, lets call it a button, and drag it from a FlowLayoutPanel and drop it in a diff FlowLayoutPanel?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved