Variables Would Improve Script Execution Time?
Jun 20, 2012
I was updating an old .aspx.vb script that was originally written with dynamically typed variables, like this:
Dim price I updated them to the following format (along with some IsDBNull checks to compensate):
Dim price As String After doing this to all of my variables, the script appeared to run noticeably faster. Is this a real effect of static typing, or is it just a coincidence?
View 1 Replies
ADVERTISEMENT
Feb 15, 2012
"Does the selection type of variables speed up the code execution in VB.NET?"For example, I have two same exactly same projects where the first project is running with all Single variables and the other project which running with all Double variables.Is there any difference in term of the speed of code execution?This is because I'm working on a project which is very critical in term of the speed of execution. However, I'm using Double variables for most part of the code.
View 4 Replies
Dec 28, 2009
I've found out that if two instances of an SSRS report run at the same time, any Code variables declared at the class level (not inside a function) can collide. I suspect this may be the cause of our report failures and I'm working up a potential fix.The reason we're using the Code portion of SSRS at all is for things like custom group and page header calculation. The code is called from expressions in TextBoxes and returns what the current label should be. The code needs to maintain state to remember what the last header value was in order return it when unknown or to store the new header value for reuse
View 11 Replies
Jun 24, 2009
My application does some intensive tasks on a second thread, while updating the main form. I want to show how long these tasks have been running (increments every second), i've read timers can get out of sync and even fire off multiple ticks at once, so how can that be fixed, or what's a better solution for this?
View 3 Replies
Aug 15, 2011
PFB the code for a search button where when a user enters a text in the text box ,it takes the keyword compares it with an xls which has 1600 rows and 16 columns with keywords.If the keywords match, it has to full the 3rd column where the name is specified.Its running but its taking more than 20-25 mins for processing.I knw searching 1600 rows and 16 columns will take time but pls advice if i can make this process a lil faster.
[Code]...
View 13 Replies
Jun 13, 2012
Actually, I am trying to find out whether the partno is existing in the database table or not and it takes long time in count = checkCommand.ExecuteReader statement
Public Function CheckProductNo(ByVal Partno As String) As Boolean
Dim count As SqlDataReader
Dim valid As Boolean = False
Using connection As New SqlConnection
[code]....
View 4 Replies
Aug 13, 2010
Recently, I've been running some tests with C++ and VB.NET to compare execution speeds. In the last thread I posted, I talked about how I had encountered the fact that C++ was executing just as fast as VB, but got that issue resolved. Now I'm hitting my head against another wall:I had made a DLL for VB.NET to test out this theory and compare in just one program side by side execution time of identical VB.NET and C++ code. But the interesting thing? VB.NET's execution time improved such that it was now exactly identical to the execution time of C++. Spending some time with the problem, I discovered that the "Target CPU" option in advanced compile options in Visual Studio 2008 was the culprit!
Since I'm running 64-bit Windows 7, I figured making the target CPU x64 would yield the best execution time. Wrong. Here are the results in execution time of a Windows Forms application for VB.NET,calculating all the prime numbers up to 10,000,000 and getting their sum.
Any CPU: 15.231 seconds
x86: 10.858 seconds
x64: 15.236 seconds
Below is the code I'm using, feel free to test it yourself:Public Class Form1
[Code]....
View 3 Replies
Mar 16, 2012
i have difficulties in making school schedule time and school bell? how to modify time span in comparing more than 40's variables time.
View 3 Replies
Dec 26, 2009
Windows Application
Front End: Vb.net
Backend: Oracle 10g
I am executing the sql query to fetch values and showing it in my datagrid..and when i do that it works perfectly fine...and problem is that it takes 10 min for my datagrid to fill...so in between i want to show the execution time to the user in another form till my query processing completes..
My
Dim oradb As String = "Data Source=zorb;User Id=baady;Password=zacky;"
Dim conn As New OracleConnection(oradb) ' VB.NET
Try[code]......
View 2 Replies
Nov 14, 2011
I have a per-call WCF service that serves a number of clients. I'm looking to speed up the services by running some background processes so they don't block or slow down the main function of the services.
One example is that the main function needs to return a set of data, while the background thread needs to record some statistics based on the parameter(s).
Code:
Public Function GetAccountDetails(id As Integer) As AccountDetails
Dim retVal As New AccountDetails
Dim a As New Accounts
[Code]....
If I use this background thread to record the statistic it doesn't block the main thread from returning the data to the client.
It's been working well in test scenarios, but my question is, are there any dangers with leaving this thread to execute without Joining it before returning the data to the client? Could there potentially be any loss of statistic data? Could there be potential memory problems on the server side?
View 1 Replies
Dec 6, 2009
FIRST = arguments checked against each other
SECOND = arguments checked against each other but are irregardless of the FIRST arguments.
If (FIRST and (FIRST or (FIRST and FIRST))) OR (SECOND or (SECOND or SECOND or (SECOND and (SECOND or SECOND)))) then As the program processes this line over a million times during the execution, only FIRST or SECOND section is needed during an execution, never both. How do I make the program use only the section that's needed for the current execution instead of checking every argument every time? Is there a way to turn a string into an argument list for an IF...THEN statement? [code]
View 13 Replies
Dec 31, 2010
Is it possible to wait/suspend execution for a certain amout of time without hanging the main UI thread?
View 7 Replies
Jul 29, 2010
for example
Dim CurrentSplitter As String = My.Settings.CurrentSplitter
lblCurrentSplitter.Text = "Current splitter: " & CurrentSplitter
vs
[Code]....
View 7 Replies
May 9, 2011
I have set up a simple quiz where you drop answers to the correct question. I have implemented a system where the are 18 text boxes (9 for questions, 9 for answers) and it can be customised but I want the questions to be able to be 'saved's since it in another form the if I give them special names when I close the form and open it again it has lost the values. Is there a way to remember the variables for a set period of time (cookies?) or if not just for that session?
View 2 Replies
Apr 6, 2011
I recieved a gift recently visual studio 2010 ultimate a nice suprise I have been repairing and building PC's and networks for years working in local shops and buisnesses, but always wanted to learn programming so my GF purchased this for me nice suprise. So here is my beginner question. I am making a program that will take check info ( check number, amount, date and person or buisness wrote to). I have no plans on using it just trying to learn variable structures and arrays and thought this type of program was a good start. Now I would like to take the text of a text box in runtime and use that to input a new check number into the variable structure. Just so I am not confusing anyone I will write the basic code
[Code]....
So what I would like to do is use a textox labeled check number to add check numbers into the checkrecord structure instead of having to add them into the code manually is this possible?
View 2 Replies
Nov 9, 2009
I am creating a very simple game for a project. There is opportunity for bonus marks, and one thing I would like to do is be able to "save" the game. The only thing I need to do is save about 4 variables to be recalled the next time the program runs.
What is the best way to do this?
I have searched Google, and there are ways to link the program to an Access database, but that seams a little extreme. I tried seeing if you can make an XML file to hold them, but I can't really find any good information.
View 8 Replies
Jan 11, 2010
We have a project that needs to gather survey data. On one particular page of the website, there are 21 questions each with a scale of 1-5 where the user selects one radio button for each question in the table. The survey is being coded in VB.NET. The data submits to an SQL database. All the radio buttons are similarly named, so only the number changes for the question [Code]
View 2 Replies
Nov 21, 2011
I Have a problem whit my code.I want to receive 4 character variables (0-255) all the time and put them in the corresponding textboxes:
Public Class Form1
'Dim WithEvents Comm1 As New IO.Ports.SerialPort
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Comm1.Encoding = System.Text.Encoding.GetEncoding("Windows-1252")
[code]....
I Want to send date when I want , but I want to receive data all the time (i want that textboxes 3,4,5,6 to update whenever data is comming an form is load).
View 15 Replies
Oct 4, 2011
I'm making a IM LAN Chat, and I don't want to limit it to a specific number of chats that can be open at any given time (By re-producing the forms and setting variables once a chat is open).
[Code]...
View 4 Replies
Dec 1, 2011
I'm developing a revised version of a system I have been using for years, but with all the advantages of .NET features that were not around when I first made this. It's proving a steep learning curve! So, when a user logs in through my Login.aspx page which simply compares username/password to Database record, the system creates a session variable containing the user's Username and various other things. There are two type of variable which will be common to all elements of this system
User Specific data, Username, Permissions, etc
Setting variables, drawn from a database of pre-set facilities which are setup within the system, some will determine which facilities work, how they work, and some will be dependent upon the User's permission. Obviously, I could set everything within the Session data, but that'd be inefficient wouldn't it? If I were to set these globally available variables in my App_Code, how would I go about setting this up so that, for example, those variables which require a database call, are set for the duration of the Logged-In session and do not require constant Database lookups? Further to that, those variables which are dependent on the session state, would need clearing on each LogOut. I am using VB.NET.
View 1 Replies
May 28, 2011
Whenever i work on form, so i use this code
CODE:
Now i have 2 things to ask?
1) is this right way which i use?
2) I use the same on every form regardless on number of forms? is it fine to use it on every form?
View 3 Replies
May 28, 2011
whenever i work on form, so i use this code,[code...]
now i have 2 things to ask?
1) is this right way which i use?
2) I use the same on every form regardless on number of forms? is it fine to use it on every form?
View 2 Replies
Dec 2, 2010
I have worked in Windows Forms for years, and still do. I'm not acquainted at all with the ASP.NET technology and no other Web related technology. I have worked with:
Oracle Form Builder;
Visual dBase 7.5;
Delphi 2.0, 3.0 and 7.0;
Sybase Power Builder 10.5;
Visual Basic 6;
Visual Basic 2003/2005/2008;
And ultimately, Visual C# 2005/2008.
I'm mostly a C# programmer with a growing experience in VB.NET for the current year. What would be the way to go to learn WPF the best possible way while taking into account my experience? And I'd like to know, will learning WPF improve my skills in ASP.NET and the like?
View 4 Replies
Feb 12, 2012
I read a text file every second..[code]The file is generated from another program and it's costantly updated more times per second.The sense of the code (StartIndex) is to read only the rows that I have not read from the last time.The code works without problems until the file is about 2.5 Mb in dimensions... for higher dimensions I have problems and all becomes very slow.Using and fs.Dispose() are like Microsoft suggest (and in fact if i run the code analisys I have no problems), but surely the problem is not here.The question is: is my code right or there is way to improve the reading?? Is there way to read only the tail without to open the whole file?
View 5 Replies
Mar 31, 2010
I am having a problem in paging for XtraReports. How can I improve the report paging from runtime and also I would like to initialize the reportviewer from pageload.We are designing the reports from runtime , so the data on multiple pages is not working i mean I am not comfortable with it. I woulld like to do paging and limit the number of records on the page from runtime.for example i would like to add a PageInfo component and add a "Go to page no.." like this.
View 1 Replies
Jul 21, 2011
I'm currently in a programing class for vb.net. It's my first true exposure to OOP and I'm looking for some advice on areas where I could improve. I was wondering if someone would be willing to look at one of my programs that I have written and offer advice on areas where I can improve and things that I made much more complicated than they need to be. I'm not looking for a line by line critique just a general look at things to improve upon in the future.
View 2 Replies
Mar 9, 2010
i'm developing vb.net application. There are 10 ways of transactions. I want to produce 'Purchase register report'. For that I want to find what amount of effect has been made by each transaction on ledgers of 'Purchase account'. Purchase account has almost 30 ledgers. And transactions can produce about 10000 rows in database for a year. Now if I produce month wise report for a year, there will be 10000*30=300000 row scanning which makes it very slow in execution.
View 6 Replies
Jan 27, 2011
I'm currently writing a football management game (Australian football) and would like to pretty it up a bit. The match engine simulates each player as a small circle, much like the old Championship Manager games. While I'm fine with this style, I'd like to improve the look. I'm just using the simple graphics tools in VB to draw circles and the oval in the background which they play on. They move around using a timer. It just doesn't look very good. The movement isn't smooth and the circles look jaggy and unprofessional. Given that I'd ultimately like to release this product, I want to make it look a lot better.
What are some 2D graphics engines that I should look at? I don't need fancy animations or anything, just some nice smooth movement and nice looking circles. Doesn't seem like I'm asking for much does it? It'd be also nice if I could add in a chrome-like look or something along those lines.
As for the menus and such, well, they are currently just the boring grey VB style. That's fine for now but, as mentioned earlier, I want to release this game at some point. How can I change all of the menus and such so that this doesn't look like a game made in visual basic...basically. I've seen skins before but I'm not really interested in giving my game some generic style. I want to be able to customize all of it for myself. I just don't know how to! Simply fiddling with the colours and fonts of the default VB controls isn't enough.
View 9 Replies
Nov 20, 2011
I've got a couple of these NumericUpDown controls I put on a form. Without describing too much about the form I basically want to update some variables each time one of these NumUD controls changes value. So for each NumUD I have a call to a Recalculate subroutine within their "changedValue" event.
There are actually two problems. First, if I initialize the "Value" property to something other than zero in VB2010 at DESIGN TIME it won't even open the form when I hit RUN. It gives me a "No Source Available. No symbols loaded for any call stack frame" error. The error box says "InvalidOperationException" was not handled. So if I try to set the initial value of the Value property to anything but zero of either I get this error.
[Code]...
View 7 Replies
Jan 15, 2009
I've a class that has a list of IDs with a function for adding new IDs from a list of objects.I've got this resolved, but I'm sure this can be done with much less code.Public Class Page
Private _IdList As List(Of Integer)
Private _HasNewItems As Boolean = False
Public Sub AddItems(ByVal Items As List(Of Item))
Dim itemsID = From itemX In Items _
Select itemX.ID
[Code]...
View 3 Replies