VS 2008 RTB LoadFile Performance?

Sep 22, 2010

I am working in VB.Net and loading word documents into an RTB. Most of the files I'm loading are small 2 to 60KB and have no problems. Occasionally, I have files that are upwards of 11,000KB. It takes approximately 2 minutes to get these loaded into the control. Is there anything I can do to boost performance when loading these files?

View 2 Replies


ADVERTISEMENT

Rich Text Box Control - Word Wrap And Loadfile?

May 1, 2009

I'm having problems with getting a rich text box control in vb.net to automatically wrap text to a new line when text is "loaded" from a text or rich text file that was created with an editor such as wordpad. Both the multiline and wordwrap properties are set to true. Also the RightMargin property is set to the width of the rich text box control minus 20.

It seems as though the word wrap function only works when I'm typing text into the rich text box. But I need it to work when I'm loading text from a file in the format of .rtf or .txt that was created with a text editor such as notepad or wordpad.

View 6 Replies

VS 2008 - GC.Collect: Memory Vs Performance?

Jan 29, 2011

I have an application (i've been working on for a long time) that has many tabs and controls and quite a few components And a good deal of design code. And a list box that has around 100k items (i had to put a loader to pass the 3-4 seconds while its loading to prevent it from not-responding)I had a few Gc.collect calls in specific places (mostly after many items are added or removed). When my application loads, i call GC.collect only once at the end of the load. The program consumes around 35K memory by the time its loaded. However, i decided to mess around abit (don't worry i made backups)First i started putting gc.collect in some random places, and to my surprise the memory upon loading was observably decreasing. Then I went ahead and put a macro that puts GC.Collect before every End Sub, Exit Function, Exit Sub, and Return value, there is. Basically every block in my application had atleat one GC.Collect.
I fixed some 6 or 7 silly replace errors and compiled. When the program launched, the memory used at the end of launch was 21K!

At first glance that seemed great, but then i realized switching between tabs was VERY glitchy. and adding new lists took around 10x more time than usual (the loader stayed on for around 20 seconds!) And even though the memory looked good, the program was useless like this.Then i decided to mess around differently. I removed GC.Collect from the entire solution. It was no longer called even once.At first glance, when i launched the app it consumed just under 60K memory. That seemed terrible. However i realized something: even though my program in that state showed on taskmanager that it was consuming alot more memory than usual, it seemed like it was lighter than ever! Switching tabs was faster than before, especially every time i go to the tab that has the listbox control with 100k items. Loading items took around 3-4 seconds, but there was no stutter when the list finished loading whereas before it had an evident 0.3s stutter after the items were added.

This was all surprising to me because i thought GC.Collect was first of all, something that it doesnt matter where or how many times you call it. I thought it was just something that should be called at the end of work and i didnt think it would matter if it was called during work.Second of all, i thought GC.Collect only affected resources that are inaccessible, or resources my program is done with. How come the application feels faster when i don't call it?Third of all, i thought the VB CLR does most of the memory cleaning for me, and that GC.Collect was somewhat of a redundant command. It didn't seem so redundant to me at all considering the difference between using it heavily and not using it at all was around 38K in memory usage!

So i guess my questions are:
1) Do I need to call GC.Collect? WhereWhen do i call it?2) Why does calling it affect performance? And where does one draw the line between that memory stat on taskmanager and the program's performance?3) I also decided to run a small test. Why does a blank vb form application require 10K memory? How accurate is that stat shown on the task manager?

View 3 Replies

VS 2008 Resource Files And App Performance?

Nov 30, 2009

I'm not sure if I'm gonna feel like an idiot after posting this, but here goes . I have taken my first shot a writing a code generator. not too shabby for my first go round, but I already see some ways it can be vastly improved. Not there yet, however. One of the things this code generator does is pull text templates (MANY text templates! Over and OVER again!) from a project resource file. I have added them to the resource designer as linked text files.

Now, the way the generator is written, there can at times be a LOT of iteration (think writing property declarations for a Classs which represents a database entity, as well as the backing fields for those property declarations, etc.).

Is there any significant performance hit to repeatedly accessing a resource? I have looked around on msdn and this forum (and will continue to investigate), but I am hoping someone can give me some clarification.

I SUSPECT that use of a resource file means a trip to the Hard drive each time one accesses it . . . Right? It IS a FILE, linked by it's PATH, right? Due to it's having been designated as a project resource, id a resource file somehow "magially" made available in memory, so that the disk round trip is not necessary?

I suspect I should be retreiving popular resources into a persisted Class-level variable if I plan to use them often within a specific class scope, and at the method level if I plan to perform a significant number of iterations whihc require the resource within the method.

AM I on the right track, or is the resource retreival trivial? I am NOT concerned about milking maximum performance out of a generator tool; it is acceptable for this process to take a little time. However, I also don't want to be sloppy unecessarily.

View 2 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

VS 2008 Network File Copy Performance?

Jun 24, 2010

I'm hoping someone can point me in a different direction. I'm copying files from one computer to another. Both are on the same switch connected at 1Gbps here's my problem:Using File.Copy with a list of files I can get an average transfer speed of ~60Mbps Using multiple background workers with a split list of files and File.Copy is slower Using the FileStream read/write method I get an average speed of ~55Mbps with a 8M buffer

What can I do to get a faster transfer rate? I'd be happy to hit 250Mbps over the LAN.

View 39 Replies

VS 2008 Performance File Read/Compare?

Sep 15, 2009

this time im looking for a faster-than-fast way to read binary files into a string/buffer/whatever, like Delphi's BlockRead does.i need this for an application that checks a list of folders/files and looks for multiple files, and handles them according to specific criteria.

I know there are standard solutions for this, like DuplicateFileRemover (gotta love that sheep! ), but i need something custommade, coz i want to handle the duplicates automatically too, and im talking about GigaBytes of data i have to periodically clean out this way..So far, the algorithm i use to determine if 2 files are equal is this:

[Code]...

View 1 Replies

VS 2008 Kernel Memory - Getting Information From OS By Using Performance Counters

Jan 21, 2010

I've been trying to get memory information from the OS by using Performance Counters. Memory performance information is available from the memory manager through the system performance counters. Right now, I'm working on getting the different types of Kernel Memory, but I'm having issues getting others as well. Through Performance Counters, I've been able to get Paged Virtual and Nonpaged Kernel memory.

The article I mentioned above does not explain how to get the Paged Physical Kernel Memory. It only gives the two I mentioned and the total, which is just the two combine and isn't the Paged Physical. The information isn't straight forward, so I'm using a third party application to compare my results so that I get the correct information. The article gives me Pool Paged Bytes Kernel memory and I found out that it is the Paged Virtual Memory.

I'm declaring this and others like so: [Code] I've researched several other methods, but I can't seem to get anywhere with anything else besides Performance Counters. To sum it up, I'm looking for a method to obtain the Paged Physical Kernel Memory.

View 6 Replies

VS 2008 Performance Monitor That Will Eventually Be Running As As Service

Feb 8, 2011

I am putting together a performance monitor that will eventually be running as as service. What I want to know is if the data that is reported is what I actually want: [code]

View 1 Replies

VS 2008 Thread Performance - Processor Not Running On Full Speed With The First Code?

Mar 10, 2011

Not really asking for code, but I'm interested in knowing the basics of "thread performance".For example, you try to copy a bitmap in a pixel by pixel operation. (Is slow, but it is a nice example)

[code]...

This is, of course, very buggy and causes a lot of violation errors etc. But that doesn't matter right now. How come the multi-threading way is so much faster than the regular routine? Is the processor not running on full speed with the first code, and is it working harder on the second?I find it weird to see this type of "threading performance increase", as if every single thread gets their own piece of processor speed allocated like it is a new process

View 12 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

Timing Code - Measure The Performance Of Seven Sorting Algorithms In A Single VB 2008 Program

Sep 15, 2010

I'm trying to measure the performance of seven sorting algorithms in a single VB 2008 program. I've tried using a Timer componend, the Stopwatch, and DateTime.Ticks but nothing works. The following simple code produces a result of about 500 (milliseconds), which is correct, but when I change 500 to 1000, I get a ridiculous result like 0 or 8.

[Code]...

View 11 Replies

Performance Related Features For Migration From .net 2003 Framework 1.1 To .net 2008 Framework 3.5?

May 21, 2010

I am work on VB.net 2003 Framework 1.1 for last 3.5 years in windows Application.We are currently migrating to VB.net 2008 framework 3.5, but i don't know about the features which related to ADO.net and which is important to performance. I know linq to SQL but our architecture is made in .net 2003 so we should follow this.Any features which is very important to enhance the performance?

View 2 Replies

.net - Performance Comparison Bulk Insertion Using .Net Bulk Copy Or Table Value Parameters In SQL Server 2008

Jan 3, 2012

I am working on a desktop application in VB.Net (4.0) There will a lot of SQL scripts which contains a lot of insert queries Currenlty we are running the scripts using SMO (http://msdn.microsoft.com/en-us/library/ms162557.aspx)For performance, we have planned to change the sql scripts to xml file ( instead of insert queries, it will have xml data with a proper xsd defined )Loads xml to dataSet and Using SQL Bulk Copy we are trying to insert to SQL Server.

[Code]...

View 1 Replies

VS 2008 Error "The Requested Performance Counter Is Not A Custom Counter"

May 20, 2010

I have this code sample from a book I'm reading which looks to be incorrect:

Imports System.Diagnostics
Sub Main
Dim pc As New PerformanceCounter("PerfApp", "Clicks", False) 'excepiton here
pc.Increment()
counterLabel.Content = pc.NextValue().ToString()
End Sub

There excepion message I get is: The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly. I looked for a property to see if I can set it but couldn't find one.

View 3 Replies

Best Version To Use For Performance

Mar 15, 2011

I am running windows vista with 1gb memory and 2ghz proccessor. What would be the best FREE version of .NET to use for best performance? Its been years since I have done any PC programming and I would like to do a little bit =]

View 6 Replies

Get 64-bit Performance Data?

May 4, 2011

[URL]

The upper picture is the output of a Unix task. The lower picture is what I have in VB. Enumerating tasks is not difficult however the rest it is because it's not documented anywhere.

What am I interested in if I want to get 64-bit performance data?

View 1 Replies

High-Performance TLS With .NET?

Sep 6, 2010

I'm working on a project that calls for high-performance networking with TLS encryption in VB.NET. The stock SSLStream sucks rotten eggs; its 'asynchronous' read/write operations aren't async at all, meaning that they'll operate parallel to each other and to the main thread but that it offers absolutely nothing that resembles async read/read and write/write, which means that reads are totally synchronous to each other and writes are too (only 1 read and only 1 write can be done at a time).

I've done a lot of reading on this failing and it seems like MS has no intention of ever fixing this.Hoping a whole lot not to have to write my own TLS implementation. I've tried the Mentalis open source SSL suite, which will NOT compile. I've tried SocketWrench tools which will not compile under VS 2010 (and whose documentation indicates it's in fact synchronous on its async threads too; can only do 1 async read and 1 async write at a time).

What I want/need is an SSL/TLS implementation that actually works with DotNET that actually allows me to do multiple asynch reads/writes over a TCP/IP transport stream. Anybody have any experience or recommendations on 3rd party toolkits or alternate methods of SSLStream I/O?

View 1 Replies

IDE Versus EXE Performance In .NET?

Oct 5, 2009

I've developed a .NET application that, among other things, does the following:Uses WebClient to retrieve data from a remote server.
Serves as a socket server to 2 'satellite' applications run on the same machine or on a LAN.When I run the app in the VS IDE, it works great. It quickly gets the data from the remote server and communicates perfectly with the 2 satellites.However, when I build it and run it as an EXE, the response from the remote server is very slow and its communication with the 2 satellite applications become very poor.Is there some important difference between running an app in the IDE and running it as an EXE that could effect it like this?

View 1 Replies

Linq To SQL Performance Using Contains?

Jun 1, 2009

I'm overloading a vb.net search procedure which queries a SQL database.One of the older methods i'm using as a comparison uses a Stored Procedure to perform the search and return the query.My new method uses linq.I'm slightly concerned about the performance when using contains queries with linq. I'm looking at equally comparable queries using both methods.Basically having 1 where clause to Here are some profiler results;

Where name = "ber10rrt1"
Linq query : 24reads
Stored query : 111reads

[code]....

Forgetting for a moment, the indexes (not my database)... The fact of the matter is that both methods are fundamentally performing the same query (albeit the stored procedure does reference a view for [some] of the tables).Is this consitent with other peoples experiance of linq to sql? Also, interestingly enough;Using like "BER10%"

resultset.Where(Function(c) c.ci.Name.StartsWith(name))

Results in the storedproc using 13125reads and linq using 8172reads?

View 1 Replies

Ping Using VB - Performance ?

Jul 20, 2009

I have this code to ping a list of over 400 switches , the program works fine but for some reason the first time i ping all the switches alot of the attempts time-out(even tho they shouldnt) which makes the program alot slower , if i click ping again less of the attempts time-out(and as a result the program runs faster) and if i click it a third time i usually get a completely accurate result with all the switches pinging back "success" (except for a few which i know for a fact are down anyway) any ideas why this is ?

CODE:

View 5 Replies

Which Is Better For Performance, And Vs AndAlso

Jul 15, 2011

When writing an If statement, I've always used And when needed like: If 1=1 And 2=2 Then. The only time I ever used AndAlso is if the second condition will error if the first isnt true like: If Not IsDbNull(Value) AndAlso Value=2 Then. However, recently I've heard that AndAlso is better for performance than And as the second condition is only read when the first is true. In this case, should I always just use AndAlso?

View 3 Replies

.net - Performance And Linq In Iterations?

Mar 16, 2012

These 2 ways of working both work, but I'm wondering if there's a difference in performance:

Dim collection As ItemCollection = CType(CellCollection.Where(Function(i) i.IsPending = True), ItemCollection)
For Each item As Item In collection
'Do something here
Next

and

For Each item As Item In CellCollection.Where(Function(i) i.IsPending = True)
'Do something here
Next

I thought the second one was better as you'd have a variable less and looks cleaner, but on second thought, I'm not quite sure what happens when you put a linq query in the iteration.

View 3 Replies

.net - Performance Of Implementation Of IComparer?

Jul 14, 2011

I'm sorting a collection of type "Document" (usually around 100k records). Sorting usually takes around 4-5 seconds, and I'm wondering if there's a way to speed up sorting by modifying my "DocumentComparer" class which implements IComparer(Of Document). Since the Compare() method would be called hundreds of thousands of times, are there any performance improvements that could be made here that I've overlooked?

[Code]...

View 2 Replies

.net - Performance With System.Net.Mail?

Apr 12, 2010

I have this unusual problem with mailing from my app. At first it wasn't working (getting unable to relay error crap) anyways I added the proper authentication and it works. My problem now is, if I try to send around 300 emails (each with a 500k attachment) the app starts hanging around 95% thru the process.

Here is some of my code which is called for each mail to be sent

[Code]...

View 2 Replies

.net More Performance For Moving Objects?

May 31, 2010

I have the mission to make a small game for a school project. Pictures boxes, moved by a timer for walking enemies.If there are around 5 or 6 moving picture boxes at the form, my application get troubles and lags.After I kill some enemies (remove them from the Controls Collection of the Form/Panel) It come back smooth.I think the loop of the enemy movement is too complicated but I don't know how to make that simpler.

[Code]...

View 5 Replies

Better Performance With Multi Threading?

Feb 15, 2009

I'm creating a password hash recovery tool that uses brute force. I have the brute force algorithm run in a background worker. It all works, but some similar apps I tried out have performance ~100x bigger then my app. (mine does 50k keys/second, some others do 5m keys/second or more.)I realize this is partly caused by using a .Net language, but I suspect there are ways to significantly speed up the brute force. A lot of ppl say I should use multi threading, but how is this done in practice? Splitting up the passwords to check would slow down my app I think.

View 1 Replies

Big Performance With Oracle DataReader In .Net

Nov 10, 2010

I have a few Oracle procedures that generate/return a large amount of data that I need to write out to a file.I'm currently trying to accomplish with a data-reader. It seems to be working, I've successfully generated a 479mb file without any trouble.It took less than 4 minutes from the time I retrieved the dataReader to complete the file.But the dataReader I get for a particular procedure is crawling.It's unbelievably slow.I modified my code to try and get a better idea of what is going on[code]I'm writing a PL/SQL block that will open that cursor to see if the performance issue exists when I remove the .Net code..

View 3 Replies

C# - Improving Code And UI Performance?

May 22, 2010

I am dealing with a situation that I need some help with here. I need to improve performance on functionality that records and updates UI with user selection info. What my code current does is

'This is called to update the Database each time the user 'makes a new selection on the UI

Private Sub OnFilterChanged(String newReviewValueToAdd)
AddRecentViewToDB(newReviewValueToAdd)
UpdateRecentViewsUI()
PageReviewGrid.Rebind()'Call Grid Rebind
End Sub

[Code]...

View 2 Replies

Combobox Performance Many Items?

Oct 28, 2008

So, I've been reading around on the internet and through MSDN trying to find a way to add thousands of items to a combobox without taking 12 seconds.I KNOW, I'm going to incite reflex-responses involving: bad design; use categories and filter; use BeginUpdate ...Here's the thing.I've read through a lot of similiar forum questions as the one I'm asking and none really seemed to answer the question, but these responses are common.The problem is, there is no way to further categorize.I have thousands of customers and each customer can have anywhere from 1 to tens of thousands of designs.The designs have to IDs: DesignID and DesignTitle. The data entry people sometimes have the one and sometimes have the other. If they have the DesignID than all they've got is a number ranging from 1 to (at this time) 60,000. One Customer has 11000 designs. I don't know of any way to further categorize.The reason I use a combobox is for autocomplete. Also, with most customers there are only 10-20 designs, but for some there are thousands.I have to have one practical solution that handles all possibilities.

As far as BeginUpdate or SuspendLayout is concerned, neither have any effect.The sad thing is, the DataSource takes less than a second to load from my DataBase.It's just the setting of the datasource for the combobox that takes so long.It seems to iterate through the entire list once for the bindingsource and then again when I set the DisplayMember.I can set the display member before I set the binding source but that doesn't make any difference in terms of performance.Performance is improved by almost half when I don't use a BindingSource and just set the Combo's DataSource to the List directly, but, sadly, I need to use the bindingSource because there are multiple Combos using the same list.I know WPF uses virtualization for it's combos,.On the internet I found a Technical document on how to implement a Virtual Combobox in C#, but the code was incomplete and I don't really have the time to spend several days creating and debugging something like that.

View 25 Replies







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