Performance With Strings In An Application?

Jun 18, 2009

In my VB application,I am copying huge amount of data using VB string?This results in performance issue.What shoul I use in place of VB string to improve performance?

View 5 Replies


ADVERTISEMENT

ByRef Vs ByVal Performance When Passing Strings

Jul 22, 2010

Reading [URL] made me wonder whether the comments in there did apply to Strings in terms of performance. Since strings are copied before being passed, isn't it much more efficient (if the callee doesn't need a copy of string course) to pass strings ByRef?

[Code]...

View 1 Replies

.net - Performance-comparison Of Sort() And BinarySearch() With Integers/Strings?

Nov 15, 2010

Originally i wanted to ask if it's faster to sort Integers than Strings.But i have answered this question myself and i'm suprised of the big difference.Why is sorting and BinarySearch Integers as much faster compared to Strings?

The (VB.Net) Test with 1.000.000 Int32/Strings:

Private Function CheckIntBinarySearch() As TimeSpan
Dim watch As New System.Diagnostics.Stopwatch()
Dim rnd As New Random(Date.Now.Millisecond)
Dim intCol1 As New List(Of Int32)

[code]....

Consider having large collections of "String-Integers"("1","2","3",...). Would it even be better to parse them to integers before sorting and searching them? What is the cost of parsing Strings to integers?

View 5 Replies

Degrading .net Win Application Performance?

Oct 27, 2011

Possible Duplicate: Memory leak in .net application I am working on a desktop application in VB.net 2005.The application contains a timer with an interval of 1 min. Each time the timer ticks, a set of functions gets executed, mostly database related. Initially the application runs fine. In processes(Task manager) the cpu usage goes to 100% every time the timer is invoked. But the timespan is around 1 sec(negligible). However as the time passes and after around 20 hours the time span of timer_tick increases to something like 20-30 secs. In this period cpu usage is 100% and the application does not responds.Gradually the time span of timer_tick increases to 1 min and the cpu uses gets stuck to 100% and the application does not responds. All objects are properly disposed. Moreover, this issue is with pentium 4 processors. The application runs fine on core 2 duo.I am using DevEx controls in my application.The program runs fine with less records in database.I have run the CLR Profiler. The code seems to be fine.

View 1 Replies

.net - Solve The Performance Decay Of A .NET 1.1 Application?

May 20, 2010

I have single-thread windows form application written with VB.NET and targeting Framework 1.1. The software communicates with external boards through a serial interface, and it mainly consist of a state machine that run some tests, driven in a loop done with a Timer and an Interval of 50ms. The feedback on the user interface is done through some custom events raised during the tests.

The problem that is driving me crazy is that the performance slightly decrease over time, and in particular after 1200/1300 test operations. The memory occupied does not increase over time, it is only the CPU that seems interested by this problem. The strange thing is that, targeting framework 2.0 and using the same identical code, I do not have this problem.

I know that is difficult without looking at the code, but do you have suggestions how can I approach the problem? EDIT: I am really lost, after a couple of intensive work the application starts slowing down. The selected row is related to its process, if it could help.

EDIT2: Using the Windows Task Manager I detected that the Handles counter is increased by 1 at the end of each operation. I don't know if it is the cause but the application starts to slow down when the handles counter reaches about 1500 handles. I checked that all necessary RemoveHandler are called after each operation. Any idea?

EDIT3: I found that the handles problem is generated by the C++ library we are using to communicated with the serial device. It then happens both in .NET 1.1 and .NET 2.0. The difference, and that's strange, is that if the target .NET 1.1 the application slow down/freeze instead for .NET 2.0 I reached more than 30000 handles without loosing performances. Now I don't know if the problem is really caused by this lost handles, I will try to ask to the developers of C++ library to correct the problem and see if it solves the problem I am having on .NET 1.1.

View 4 Replies

SAPI Slows Application Performance?

Oct 15, 2010

I'm using Visual studio 2008 and microsoft sapi in a forms application. I am using text to speech which works just fine however when the computer is speaking it "bricks" the application and the main ui is unresponsive until the computer is done talking then everything returns to normal. To counter this issue I tried using the background worker thread to establish the sapi on another thread however the form is still freezing when the computer speaks. I would like to note that at this point there is nothing on the form except a tabbed window and a few buttons the form is not performing any code what so ever other then the text to speech.

View 18 Replies

[2008] Application Performance Explorer?

Mar 25, 2009

Stupid question, but how do I get access to this Explorer? To create a performance session for Windows client application:(1) Open the solution in the Visual Studio IDE. (2) On the Analyze menu, click Launch Performance Wizard.(3) From the Which of the following available targets would you like toprofile? drop-down list, select the name of the application that you wantto profile, and then click Next. You can add more binaries later

View 3 Replies

C# - ASP.Net - Create An Application That Has The Potential To Be Very Performance Intensive

Jan 9, 2010

Until now, I have not create any massive applications using ASP.Net. However, I am looking to create an application that has the potential to be very performance intensive. So I am looking for some tools or best practices when it comes to performance. I would like to be able to know how to:

See my current performance (good or bad) View items that need fixing And being able to compare two performance variable items would be great as well.

View 2 Replies

Improve Performance Of A Windows Forms Application?

Apr 10, 2009

How can I improve the performance of a Windows Forms application?

View 1 Replies

Improve The Performance Of A Windows Forms Application?

Jan 18, 2012

How can I improve the performance of a Windows Forms application?

View 5 Replies

Is There Any Application (or Plug In) That Can Test Performance In Seconds

Jul 15, 2011

Currently I'm writing a VB.NET app and it's getting big, resulting in its become very slow.Is there any application (or plug in) that can test the performance in seconds?I mean, when I click a button and it displays a product, I want to know exactly how long it is gonna take.

View 3 Replies

Perform In-house Test Performance For .net Application?

Aug 21, 2009

my friend is currently development an application using SOA Architecture, He sent me a picture with a lot of layers (10 almost) and he is worried about performance issues, the application is development on VB.Net 2.0 & 3.5 (some libs).

View 3 Replies

Performance Counters Incrementing Improperly Into Application?

Jul 23, 2009

I'm trying to weave a .NET performance counter into an application. When I call the incrementBy(value) method on my avg performance counter it is changing the RawValue of my base counter by value as well. I checked the variable names and think everything is correct. Then when I call increment() on my base counter it adds 1 to the rawvalue of the avgcounter as well as incrementing the base counter... adding insult to injury!

In code I'm using two different counters to measure the time a merge sort I wrote takes. I have a instantaneous counter for the elapsed time of the sort and an average counter.
Dim timePiece As New Stopwatch()
timePiece.Start()
MergeSort()
timePiece.Stop()
[Code] .....

I think I may be using the counters wrong, but why does changing the rawvalue of the average seem to also change the rawvalue of the base? i dont think that's supposed to happen.

View 1 Replies

Performance - Running Application On Windows 2003 Server?

Mar 3, 2010

I've developed a VB.NET application with Visual Studio 2008. The application communicates with SQL Server and processes a text file.

My question is about performance. While I run it from Visual Studio 2008, it takes 3 sec to complete. The same is when I run the executable created by the Setup Wizard on my desktop (Windows XP sp 3). But if I run the executable installed on a Windows 2003 Server, it takes 15 sec to complete! What could be the reason of degrading performance on the server vs. the desktop? The .Net framework 3.5 SP1 is installed both on the desktop and the server.

View 1 Replies

Way To Concatenate List Of Strings Into A Comma-separated Strings, Where Strings Are Members Of An Object?

Oct 16, 2009

Say I have a List(Of Tag) with Tag being an object. One member of Tag, Tag.Description, is a string, and I want to make a comma-separated concatenation of the Description members.Is there an easier way to do this than to read the Description members into a List(Of String) and then use the Join function?

View 2 Replies

[2008] Application Performance Explorer - Open The Solution In The Visual Studio IDE

Mar 25, 2009

Stupid question, but how do I get access to this Explorer? The says: To create a performance session for Windows client application:

(1) Open the solution in the Visual Studio IDE.

(2) On the <B>Analyze</B> menu, click <B>Launch Performance Wizard</B>.

(3) From the <B>Which of the following available targets would you like to profile?</B> drop-down list, select the name of the application that you want to profile, and then click <B>Next</B>. You can add more binaries later.

(4) Accept the default Sampling profiling method, and then click Next.

(5) Click <B>Finish</B>.


Only problem is that there is no <B>Analyze</B> menu in the IDE.

View 1 Replies

Compare Two Strings In A Windows Application?

Dec 16, 2010

I would like to compare two strings in a vb.net windows application

Imports System.Windows
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

[Code].....

correct the logic if there is any mistake in that?

View 3 Replies

Storing Strings And Application Settings?

Jun 25, 2010

I've came to the stage where i need to save strings and application settings for my application. The My.Settings have worked it out until now. Now i have to store so many settings it's hard to keep track of them. That is why i need something new. So i've been looking around in INI files which seems impressively simple - but not very flexible. I've also took a look at XML which seems to be something to dive in to. But what i need now is advice. How do you store settings?

View 11 Replies

Generate A Lot Of Random 2 Character Strings For Application

Aug 28, 2010

I need to generate a lot of random 2 character strings for my application. it's a VB console application. basically what I have tried for random strings is this:

Private Function GenerateRandomString(ByVal intLenghtOfString As Integer) As String
'Create a new StrinBuilder that would hold the random string.
Dim randomString As New StringBuilder

[Code]....

What is going on? I thought that I used to, a long time ago, be able to just do random.Next.

View 2 Replies

IDE :: Missing Connection Strings In Application Settings

Nov 11, 2010

I am using VB 2008 & MS Access 2007 Databases for my Windows Forms Applications.The Problem is my Connection strings have been disappeared from DataSource Configuration Wizards & now i am unable to edit any Connection String in DataSet Designer.I had tried to create a Macro in MS Access Data File but didn't know how to create & so desided not to save any & just quit from Access and came back to Visual studio. Since then only this prob. has started. Earlier to this everything was just fine.I have tried to uninstall MS Office as well as Visual Studio then Re-installed Visual Studio but the problem is still there.

1] Error while trying to Reconfigure Data Adapter in Dataset

2] Disappeared options & Empty Connection Combo Box

3] Add Connection DialogBox with no DataSource property line in the Grid control

View 2 Replies

.net - Resources/App.config Or Database Where Is The Best Place To Application Strings

Mar 25, 2009

I was currently looking at on old application that I am maintianing and it uses a mixture of retrieving Application config settings from both the App.config and application config table in the DB.In the new software I am working (a port of the old application) I have a list of email addresses that are static and rarely change, what would be the best mechanism for retrieving these. Currently I am using resource strings so that using them is a simple My.Resources., but what are the benefits/drawbacks of storing the information either in the App.Config or a database table.

View 3 Replies

VS 2010 Sending Strings To Application Out Of Focus / Or In Tray?

Dec 11, 2010

I have googled this and found older vb codes that do not work in 2010. The user, in this case a "cheater/hacker" isn't suppose to be aware of a running program that checks memory and some other information. I have succesfully read the values of certain memory adresses in my program, now I need to send those values to another program secretly opened as a date and time sort of thing. The program checks for malicius attempts to edit memory or edit information inside the software and it automaticly deletes all the data or does a "ban" if somebody attempts to freeze memory and edit it.

So the problem is how to send this data to program out of focus, I can send strings with appactivate but it will open my security program to screen everytime memory changes witch is almost every milisecond so it's almost useless cause it keeps switching focus. I need something to send it out of focus, so my question is;

I make a hook between my program and my security program, send messages/strings out of focus or in tray?Also it would be good if I could make my program "invisible" so he can't be seen even in tray and still keep working.

View 2 Replies

Application - Reference Quite A Few Pictures And Strings From My.Resources - Error - "There Were Several Build Errors

Feb 24, 2011

I'm making a project for school with a group of classmates. It is an application that needs to reference quite a few pictures and strings from My.Resources. I don't know what the problem is but, whenever I run the program, I get a message that reads this: "There were several build errors. Would you like to continue and run the last successful build?"

And then below in the Output:

----- Build started: Project: Wilkes-Barre Virtual Scavenger hunt, Configuration: Debug x86 ------

COM Reference 'WMPLib' is the interop assembly for ActiveX control 'AxWMPLib' but was marked to be linked by the compiler with the /link flag. This COM reference will be treated as a reference and will not be linked.

View 5 Replies

VS 2008 Send An Object Instead Of Strings Which Includes Multiple Unsigned Integers And Strings

Aug 13, 2009

I am working on a UDP Client/Server, and currently i have them sending back and forth strings, which i convert to bytes, and then open the bytes to read. I want to now send an Object instead of those strings, which includes multiple unsigned integers and strings.

View 39 Replies

Prepend A String To All Strings In A List Of Strings?

Aug 5, 2010

I have a list of strings. For each string in that list, I want to prepend another string. I wrote a method to do it, but I was wondering if there was something already in .NET I could use to do this. It seems like something that could be built in, but I was not able to find anything.

Here is the method I wrote:

Private Function PrependToAllInList(ByRef inputList As List(Of String), ByRef prependString As String) As List(Of String)
Dim returnList As List(Of String) = New List(Of String)
For Each inputString As String In inputList
returnList.Add(String.Format("{0}{1}", prependString, inputString))

[code].....

It works, but I would rather use built in functions whenever possible.

View 5 Replies

VS 2008 Using List Of Strings Or Array Of Strings?

Oct 16, 2009

I'm migrating from VB6 to VB.NET, in hence my questions below:

I have to write a function that returns array of strings.

How can I initiate it to empty array? I need it since I have to check if it's empty array after it returns from this function.

Is list of arrays better for this purpose? If I use a list - Is it empty when it firstly defined? How can I check it it's empty?

View 3 Replies

Create An Application That Will Randomly Select 14 "stations" (strings) From A List Of 33?

Mar 3, 2012

I am trying to create an application that will randomly select 14 "stations" (strings) from a list of 33. My thinking is that I have a for/next loop that randomly selects a number between 1,33 which is then inputted into an array (arrnumber) I then want those random numbers to then be used to call the Station name which is saved in the second array, and then for the selected stations to be populated into a listbox (potentially by storing those names selected in a new array?)

Various people have suggested either using a list (of t) instead of arrays, or a Dictionary(?) or perhaps even a database, though I am not all that confident with VB to be able to know where the best place to start with that is. So if anyone can offer any advice, pointers as to how I can link my 2 arrays (I am pretty sure I know how to make the array populate a listbox) I would be very much obliged.

Public Class Form1
Dim Stationid() As String = {"Cardiovascular Examination", "Respiratory Examination", "Abdominal Examination", "Abdominal Examination with Stoma", "Groin and External Genitalia Examination", "Cranial Nerves Examination", "Arm Examination", "Leg Examination", "Parkinson`s Examination", "Cerebellar Examination", "Speech Examination", "Hand Examination", "Elbow Examination", "Shoulder

[code].....

View 5 Replies

Find Strings Inside Strings?

Aug 15, 2011

I have been looking for examples to find the string between two strings. This top one works fine;

Public Sub ReadData(ByRef keywordStart As String, ByRef keywordEnd As String, ByVal filename As String)
Using reader = New StreamReader(filename)

[Code].....

Now the first one is fine - Ext_Volume is result of the string between the strings <Volume> and </Volume>. <Volume> and </Volume> are unique so this is straight forward.

However the second one - "^FDExp:" is unique, but "^FS" is not unique. There are occurances of "^FS" before and after "^FDExp:".

How do I get the string to search AFTER the occurrence, not before etc?

View 5 Replies

How To Extract The Strings Out Of An Array Of Strings

Jun 24, 2011

Dim str As String
Dim str2 As Array
str = "blabla duhduh"
str2 = str.Split(" ")

View 2 Replies

Use Regular Expression To Get Strings Between 2 Strings?

Apr 6, 2012

Say the string is something like

bla bla bla bla (cat) bladfdskdfd dsgdsdksf (dog)
dfdshfdskdskfsdfkhsdf sdkfhdsfkdf (kathy) fdsfhdskfhdsfkd (doggy)

I want a generic.list (of string) containing

cat
dog
kathy
doggy

How to do that with regular expression in vb.net

Later I want to do something more complicated like getting all strings between "url":" and ", from this strings

[Code].....

View 1 Replies







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