Results 1 to 4 of 4

Thread: VB Performance

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2001
    Location
    Scotland
    Posts
    2

    Exclamation 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
    Regards,
    Hugh O'Donnell
    Lead Software Engineer
    Ingenco

  2. #2
    Hyperactive Member DavidHooper's Avatar
    Join Date
    Apr 2001
    Posts
    357

    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.
    There are 10 types of people in the world - those that understand binary, and those that don't.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2001
    Location
    Scotland
    Posts
    2
    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
    Regards,
    Hugh O'Donnell
    Lead Software Engineer
    Ingenco

  4. #4
    Hyperactive Member DavidHooper's Avatar
    Join Date
    Apr 2001
    Posts
    357

    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?
    There are 10 types of people in the world - those that understand binary, and those that don't.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width