-
VB Performance
Hi
I have a .exe written in Visual Basic 6 which reads from an Oracle Database and writes one row to an
Excel worksheet using an application ref object (Note: I'm a java developer farly new to VB!). Most
calculations are performed internally (i.e. not within the Excel worksheet) and the problem is:
On Workstation 4 256Mb RAM, 16Gb disc space, 233 Mhz
: it takes on average 1 min to complete this operation.
On Server4 512MbRAM, 16Gb disc space, 700 Mhz (Dual Processor)
: it takes on average 3-4 min to complete this operation.
Why the discrepancy ?
Any thoughts ?
Regards
Hugh O'Donnell
Software Engineer
Ingenco
-
Hmmm...
Some thoughts:
*Maybe the server is busy doing other things.
*Where is the database stored?
I read something once about awful byval or byref performace on the server or maybe it was early or late binding I can;t remember, but i;ll check it out if you want.
-
David
Many thanks for your reply!
The Oracle Database is on the same machine...The only other services running are IIS & the Servlet engine JRun.
I would appreciate you chasing up for me, and I will look into the ByRef/ByVal - thanks!
Regards,
Hugh
-
here it is...
Two possibilities. This is according to VB and VBA In A Nutshell by O'Reilly.
1)Early or late binding. This is used when you declare objects. Dim x as new y is early bound. dim x as y and then set x=y is also early bound. but dim x as object is late bound. Now check this: everyone always says use early binding at all costs. This is true for out-of-process EXEs such as running an exe across the network. But untrue for inprocess stuff such as you may be using on your server.
Also, the differences between early and late are more apparent on Win9x than NT.
2)Passing variables to procedures is faster with ByRef with in-process. Byval has the performance advantage when out-of-process.
Helps?