Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VB and ASP optimization tasks

Posted on 2004-03-30
2
Medium Priority
?
399 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 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

705 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