Solved

VB and ASP optimization tasks

Posted on 2004-03-30
2
396 Views
Last Modified: 2013-11-13
i am running an standard exe using Wscript.shell. my Vb program accepts 2-5 parameters and connects to a remote database and downloads those tables from SQLserver. the parameters i pass are the table names. it will download the data and zip them and email the user as attachment and uploads these files to a ftp server using Inet object. Is there a way to speed up the process ? and how can i close the VB program if connection to remote database fails or data download is stuck or for some other reason. can anyone give me step by step code to do these optimization tasks and to speed up the entire process.plz help me the project is due today and i have everything ready but its running too slow.

I appreciate ur help in this regard
Thanks
Rama
0
Comment
Question by:ramakrishna1080
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Expert Comment

by:sokolovsky
ID: 10721558
Post your code, at least part that connects to a remote database and downloads those tables from SQLserver
0
 
LVL 17

Accepted Solution

by:
inthedark earned 500 total points
ID: 10722663
How many seconds does it take at present? Provide a timing for each part of the process. Emailing is a very slow method of data exchange.  This is because the Zipped data has to be expanded to base64 encoding.  Then a connection to an SMTP server  has to be made, this can take ages (anything upto 1-2 minutes for before the server lets you start sending. The smtp server then contacts the destination MX server and repeats the process.

If you are send via the vbSendMail app. I have reworked the base64 encoding so that it is serveral times faster, but I don't think this is where the slow point is.

In theory the maximum speed could be calculated.

The worker dll has to connect to an SQL server and get the records. For best  speed this yould be using a client locatoed recordset using a readonly+forwardonly options.

Guestimation for a system which does not use email (all depends on size of data):

System A initiates the request for data from System B to be upload onto System C.

If System B was listening on a port using as winsock control.

Process for system B.

Accept the request 0 seconds

RS Open
Say a smallish recordset should only take about a second to open the recordset.

Convert RS to a file
Using the RS.Save with the adPersistADTG should take about 0.5 seconds to save the data.

ZIP the data
Again this should only take about a second.

Convert to base64
Should take about 1 sec per MB.

Send the data back to the client, using winsock. This depends on speed of internet/lan. Much more time is running on internet.

Process on system A continues after all data has been received.

Decode the base64 data takes about 1 second per MB.

FTP to System C

FTP the data to the destination server say about 1 second for this. But longer if uploading via the internet.

So the total time should only be about 6-7 seconds per megabyte if both systems are on a resonable lan.

You could shave some further time by sending the request drectly to System C eg:

System A contracts System C (the destination for the data) and send the parameteres needed.  System C contracts System B and gets the data and then saves the data locally.  This should be looking about 3-4 seconds.


0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
using web browser with BING 40 148
Not needed 13 133
add criteria to query in VB, Access 2003 2 47
JVM error from eclipse 1 25
This article will show, step by step, how to integrate R code into a R Sweave document
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question