Program Logic To Speed Up Processing?

Oct 11, 2009

I have setup an application to parse about 3000 files a day where each contains around 4000-5000 posts in xml format with like 100 fields.It involves a lot of cleanup and parsing but on average it takes around 6 seconds per post.Now I tried threading but because of the way I have everything set up with variables being overwritten etc...I have divided the files into different folders and just created copies of the program to run and access the assigned folder. It is running on a windows 2008 server with 16 G of memory and I am told I need to reprogram to speed up the process and also not use so much memory.

For i As Integer = 0 To fileLists.Count - 1
Do
Try

[code].....

View 2 Replies


ADVERTISEMENT

VS 2010 Program Logic To Speed Up Processing

Mar 29, 2011

I have setup an application to parse about 3000 files a day where each contains around 4000-5000 posts in xml format with like 100 fields. It involves a lot of cleanup and parsing but on average it takes around 6 seconds per post. Now I tried threading but because of the way I have everything set up with variables being overwritten etc...I have divided the files into different folders and just created copies of the program to run and access the assigned folder. It is running on a windows 2008 server with 16 G of memory and I am told I need to reprogram to speed up the process and also not use so much memory.

[Code]...

View 3 Replies

C# - (.net) Logging The Function Logic Of Program?

Jul 22, 2009

I'd like for debugging purposes to be able to log what functions are called and in what order. So I've been just putting Debug.WriteLine("myFunctionName(args)") all over my functions, logging it in the end to a file. Isn't there a better approach to do this?

View 4 Replies

VS 2008 Program Logic With Threading

Nov 22, 2010

I have an application that I need to automate where at a certain time each day, say 6pm, it will run a certain method(which is to check a database for key terms and then access the api to search for these terms). But there is the main process which is running all the time accessing the stream api so when the search is complete, it interrupts the stream and hands over the new terms. Now I thought of adding the .exe file to windows task scheduler but not sure if that would work. The stream method runs indefinitely and at 6pm each day another process needs to run. I thought of using the system.threading.task TaskFactory but I am using visual studio 2008 ( I do have .net framework 4.0)If it launches using the task scheduler as 6pm with my code logic as follows:[code]

I see how this would eat the CPU...the streaming process is basically following a list of user profiles listening for new activites and storing these as XML files. This a real time feed to an API. At a specific time once a day, a second process needs to go access a database for new ids, and if there are new ids, then go to a search API and get new user profiles. This is the main criteria..once the new user profiles are found, the list that the stream users needs to be updated so the process will be interrupted for a second or just paused and then continue processing.

View 10 Replies

C# - Changing Program Logic To Accommodate New Retail Tax Law?

Jul 23, 2010

Background: I have a program that has implemented the two "classic" taxes for Ontario Canada: 5% GST and 8% PST. At the beginning of July (2010) the province switched to one combined HST tax of 13% for the most part. Effects and changes here but those aren't the main point of this question...

Question: What are best practices and good solutions to accommodate for future changes easily in retail taxes? Tax changes occur often enough. I'm sure there are a many SO users with good experience.

View 2 Replies

Multi-threading Processing - Processing A Large List Of Records And Inserting Them Into SQL Database One By One

Mar 18, 2011

I just learned some basics of multi threading in VB.net recently as I came across processing a large List of records and inserting them into SQL database one by one.

I have code look like this:

Private Sub btnLoadNow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoadNow.Click

Dim autoLoad1 As New Thread(AddressOf AutoLoad)
autoLoad1.Start()

[CODE]...

Itemlists is a global lists i retrieved from database, everything looks fine to me but when i run this program, I found that the threads are inserting one records 9 times into the database(I have 9 threads in total), which makes me think that maybe i need to specifically assign 1/9 of a list to each thread? Is there another way to do it which doesn't require the splitting of the list, if not , how do i split it then assign?

View 1 Replies

2008 Array Processing And Sequential File Processing?

Jan 6, 2010

2008 Array Processing and Sequential File Processing

View 14 Replies

VB 2008 Array Processing And Sequential File Processing

May 19, 2011

Im a college student and this is my first programming class, i am having extremely diffcult time with arrays and sequential file processing. Im not asking for the whole program, just something to get me started and hints along as i progress with it. Please help me get started on my program, its due in 2 days.

Here are the requirements....

1. The program must input any number of individual�s last and first names using two separate textboxes.
2. The array of names must be sorted by the last name using a bubble sort. You must code the sort.
3. The program must be able to recall the names from the file and add to the existing list of names so that more names can be added to, sorted, and written back to the file in sorted order.
4. Sort in ascending order: A to Z
5. All names must be displayed in a listbox in sorted order when the user wishes to see them.
6. In the listbox the last and first names must be separated by a comma and a space. Example: Smith, Mary
7. The user must be able to search for a name in the array, using the binary search algorithm. You must code the search.
8. Do not use module-level variables. Instead you may choose to use Static.
9. The program must be designed using Visual Basic 2008

View 3 Replies

Program Know When Server Is Done Processing My Request?

Aug 18, 2009

I am connecting to my mail server using IMAP and Telnet. Once I am connected I am marking all items in the inbox as read. Some times the inbox will only have a couple of e-mails, sometimes the inbox may have thousands of e-mails. I am storing the response from the server into a Byte array, but the Byte array has a fixed length. [code]...

But the response from the server varies based on how many e-mails are successfully marked as read since I get one line of confirmation for each e-mail processed. There are times where the response may contain only 10-20 lines, other times it will contain thousands of lines. Is there any way for me to be able to get the response from the server in its entirety? I mean it seems like I would have to know when the server was done processing my request, but I'm not sure how to go about accomplishing this.

So to reiterate my question is: How can I check in my program to see when the server is done processing a response?

View 3 Replies

Use Program 2005 For Image Processing?

Oct 5, 2009

How to use VB.NET 2005 for image processing?

View 5 Replies

VS 2008 Program Freezes While Processing

Sep 15, 2009

the hex convert code seems to work etc but it freezes but it does its job eventually I read that backgroundworkers can be used to fix this issue but I have no idea how to use it for my script

[Code]...

View 2 Replies

Best Speed Up Running Of My Program?

Sep 5, 2011

How do I best speed up running of my program?Once I have simplified code as much as possible, made it smaller. By using loops were appropriate etc.

View 7 Replies

Best Speed Up Running Of Program?

Sep 5, 2011

How do I best speed up running of my prog?Once I have simplified code as much as possible, made it smaller. By using loops were appropriate etc.

View 1 Replies

Gradually Transition To NHibernate Persistence Logic From Existing ADO.NET Persistence Logic?

Sep 3, 2010

The application uses ADO.NET to invoke sprocs for nearly every database operation. Some of these sprocs also contain a fair amount of domain logic. The data access logic for each domain entity resides in the domain class itself. ie, there is no decoupling between domain logic and data access logic. I'm looking to accomplish the following:

[Code]...

View 2 Replies

Make A Program To Test A Speed Of Mac?

Feb 10, 2012

are there any way we can make a program to test a speed of mac even if you are not using it?

like for instance
64:16:F0:003:9A

how can i test this without using it?

View 1 Replies

VS 2010 How To Find Program Speed

Apr 4, 2012

Are there any ways to make my program more accurate or faster? So far, I've been using multithreading and priorities.

View 28 Replies

Check Internet Speed - Download A File Like 1mb Size, Then It Will Calculate The Speed?

Feb 21, 2012

How do i exactly check internet connection speed.I have searched around google and found out a method w/c will Download a file like 1mb size, then it will calculate the speed.

View 1 Replies

Check The Bandwidth (download Speed And Upload Speed) Of A User In .net Or Php?

Dec 31, 2010

how do i check the bandwidth (download speed and possible upload speed) of a user in vb.net or php that uses my app or visits my site resp?

View 1 Replies

VS 2010 Calculate DownLoad Speed And UpLoad Speed Kb/s And Graph

Nov 30, 2010

I have a codes that calculates DownLoad speed and UpLoad speed kb/s. I would like to implement this kind. I also want to put such kind of graph. Any article or links where can I start building my own like that.

View 2 Replies

[2008] Show A Processing Message For Opening Serial Port After Program Running?

Feb 12, 2009

In Form1 there are a lot of boxes like checkbox, label....I want to show a processing message for opening serial port after program running. So I created Form2 specifically showing "Opening Port...". So in Form1_Load() I used Form2.Show(). However this message showed behind of Form1. I think this was executed before all the other tool boxes loading. So where should I put Form2.Show()?

View 2 Replies

Executing A SQL Server View From .NET Program Speed?

Mar 1, 2012

I am using VB.NET 2008 and SQL Server 2005.The program runs on a different machine than SQL Server machine.If I read a SQL Server view from my VB.NET program (instead of executing a stored procedure)for ex: Select a,b,c from MyView where account = '1' and symbol = 'abc'will the speed of executing the view depends on the resource (CPU and RAM) of the machine where the program is running or the machine where SQL Server is running ?

Dim m_cmdSQL As SqlClient.SqlCommand
Dim m_daSQL As SqlClient.SqlDataAdapter
Dim m_dsSQL As DataSet

[code]....

View 9 Replies

Calculate Internet Download Speed And Upload Speed

Jul 29, 2009

i want to monitor the speed at which my system is currently Downloading and uploading. I dont have any idea how will it can be done.

View 6 Replies

Improve Speed Of Program - User Inputs Min And Max Values

May 3, 2012

I'm currently trying to improve the speed of my program. Basically the user inputs min and max values for a, b, c, and d and a constant n, and then it tries to find the curve/line in the form a (x/b + c) ^ n + d. However for large ranges (1-100 for a,b,c, and d; total of 100 million values to try), it would take around 100 minutes at the current rate (approx 800k values/minute). I'm wondering whether I can further improve the speed. [Code]

View 6 Replies

Retrieving Processor Current Speed Makes Program Run Slow?

Jun 5, 2012

I am trying to create a program in Visual Basic which will measure the performance of the CPU with every core, one at a time. In this program, I decided to place a couple of text boxes that display the processor speed and the actual processor speed. I need to get the actual processor speed to update and I have tried doing this already using a timer set to tick every second. However, when I load the program it runs really slowly and prevents me form doing anything within the program, including trying to close it down, and all it does is updates the text box every second. I have looked in task manager to find out how much CPU the program is using and it shows that my program is using 0 - 3% CPU.

Here is the code currently use

Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
Dim mSearcher As New ManagementObjectSearcher("SELECT * FROM Win32_Processor")

[Code]....

View 2 Replies

Speed Up Algorithm - Sieve Of Eratosthenes - Program Hangs On Really Large Values Of N (try 10 Million)

Aug 17, 2009

I've written an algorithm that I believe to be correct for computing prime numbers up to n with the Sieve of Eratosthenes. Unfortunately, this program hangs on really large values of n (try 10 million). Here is what I've written...

Protected Function Eratosthenes(ByVal n As Integer) As String
Dim maxValue As Integer = Math.Sqrt(n)
Dim values As Generic.List(Of Integer) = New Generic.List(Of Integer)

[code]...

How might I speed this algorithm up? Where are my bottlenecks?

View 12 Replies

Check For The Lan Speed And Put This Speed Value In A Progress Bar?

Jan 4, 2012

i want to check for the lan speed and put this speed value in a progress bar.

for example:

[==== ] the lan speed now is 23 KB/s

and there is another problem is if there are a LAN and a WiFi adapter in the same time how do i check for the speed for both adapters

View 1 Replies

Get The Speed Of A Computers Fan Speed?

May 5, 2009

how would i go about getting the of a fan of a computer that my program is running on in rps(revolutions per second) using vb.net?

View 4 Replies

.net 4.0 :: Get/set Properties Without Logic?

Jan 19, 2012

In many of the articles I have read on the web say that when creating properties in vb.netthey should use the get/set methods and a private/protected member variable in the class.

Like so:
Public Class Person
Private _name as string

[code].....

View 3 Replies

How To Do First, Previous, Next, Last Logic

May 1, 2009

in my page Having 4 Buttons ..(FIRST,PREVIOUS,NEXT,LAST) ..i am confusing to this one..

Actually what i am doing is Iam developing one efrom Designer in this user is adding pages..

so We have given These Buttons (before told)..so user click on First Button page goto Starting page and When click on Next Button Goto Next page ..like this

View 5 Replies

SQL Query - If/Then/Else Logic?

Oct 15, 2010

I have 3 tables:Sales data - SaleID, Date, StoreID, CategoryID, Cost, Retail

Store names - StoreID, Name
Category names - CategoryID, Name

I have a dgv bound to my sales table, and 2 comboboxes, one each bound to the remaining tables, with display member set to the name, and value member to the ID.

An ID of -1 represents "All Stores" or "All Categories"
An ID > -1 represents a specific location or category

So, can I use some sort of If,Then,Else logic to do something like this:

SELECT (*) FROM Sales
WHERE (IF @StoreID > -1 THEN StoreID = @StoreID ELSE True)
AND (IF @CategoryID > -1 THEN CategoryID = @CategoryID ELSE True)
AND Date BETWEEN @Date1 AND @Date2

I've found some different examples of If/Then/Else and Select Case type logic for SQL using google, but they don't seem to fit my situation, and I'm not sure how to apply that to what I'm attempting here.

View 2 Replies







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