Results 1 to 13 of 13

Thread: Why does my app work fast on my computer when running in vb6.0 - but not when exe?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2009
    Posts
    876

    Why does my app work fast on my computer when running in vb6.0 - but not when exe?

    Hi guys,

    For some reason, my vb code runs smooth and fast when running in vbmode and on my computer. If i save it as a .exe and install it on another machine, the app runs so slow. For example i can navigate through a listview quickly by clicking or pressing up and down keys. but when doing it in the exe on another machine it lags by about 4 seconds.

    Any ideads why ?

  2. #2
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: Why does my app work fast on my computer when running in vb6.0 - but not when exe

    Could be many things you'll need to provide more info but for starters what are your compile settings and what is the code used for the listview?

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    May 2009
    Posts
    876

    Re: Why does my app work fast on my computer when running in vb6.0 - but not when exe

    Okay mate, well basically it looks for data in a database stored on the main server which is located in the same office. So for the first form is a login form which checks for a user in the database \\server\db\maindb.mdb


    on my machine when i click login it logs in straight away, if i get the username wrong a error box appears in under a second. If i run the app on another machine and press login the incorrect password box will take atleast 3 seconds to pop up.


    Any ideas?

    Thanks
    Jamie

  4. #4
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Why does my app work fast on my computer when running in vb6.0 - but not when exe

    Is this the same Application using DAO accessing a Database over a Network?

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    May 2009
    Posts
    876

    Re: Why does my app work fast on my computer when running in vb6.0 - but not when exe

    Hi doogle, It is using Microsoft DAO 3.6 Object Library

  6. #6
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Why does my app work fast on my computer when running in vb6.0 - but not when exe

    First thing i'd check is what sort of timing i'd get from Pinging the Server machine from the PC in question compared to Pinging it from your PC

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    May 2009
    Posts
    876

    Re: Why does my app work fast on my computer when running in vb6.0 - but not when exe

    Hi Doogle, Just did that, they are both exactly the same, no difference :/

    Any other ideas?

    Jamie

  8. #8
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Why does my app work fast on my computer when running in vb6.0 - but not when exe

    Shortage of Main Memory perhaps? What does Task Manager report about Available Memory ?

  9. #9
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Why does my app work fast on my computer when running in vb6.0 - but not when exe

    DAO or ADO? ... two different technologies...

    but either way, the lag probably has something to do with network latency... since you're accessing a file, every time you open the connection, it's first got to go to the folder, where the server is going to check to make sure the user has the appropriate permissions to that folder (and the more folder deep the database file is, the more often this has to be done, and the longer it takes) ... and only then can you access the database itself.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    May 2009
    Posts
    876

    Re: Why does my app work fast on my computer when running in vb6.0 - but not when exe

    My computer has a memory of 66 free, 1110 cached and total of 2045.

    The other machine has a total of 2036, cached - 958 and free is 57.

    :/ not much of a difference?

    Regards Jamie

  11. #11
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: Why does my app work fast on my computer when running in vb6.0 - but not when exe

    In your first post you talk about the listview being very slow using the up down arrows or clicking so my question was about what is being done with the list view but your replay is talking about logins so I don't know what you are talking about really.

    Sounds like you are using up a lot of memory on both systems. Mine for example also has 2 gigs of ram but even with 8 windows open I am still showing 822 megs free.

    The problem could be the network but if the listview is not accessing the database when you change items and you are seeing a slow down there then it may very well be something completely different.
    What is being done in the code when the item changes in the listview? How similar are the 2 computers in terms of CPU video card running software, network connections, virus scanners, OS?

    Did you notice how much CPU load was on each computer?

  12. #12

    Thread Starter
    Fanatic Member
    Join Date
    May 2009
    Posts
    876

    Re: Why does my app work fast on my computer when running in vb6.0 - but not when exe

    Hey Guys, Well just the app in general is really slow, listview_itemclick does connect to the database but just in general the app is fairly slow.

    When i click a listview item it takes about 3 seconds to become selected.

    We are all connected to the network exactly the same way, so unsure why it's slow for every other machine except from mine when i run it in vb.

    If i compile the exe file and run that on my computer out of VB it crashes when i click login. Which is weird as it lets users login on other machines but just runs really slow.

  13. #13
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Why does my app work fast on my computer when running in vb6.0 - but not when exe

    Quote Originally Posted by JamieWarren09 View Post
    If i compile the exe file and run that on my computer out of VB it crashes when i click login. Which is weird as it lets users login on other machines but just runs really slow.
    Well, that's indicative of a coding problem. I suspect the code is making some assumptions that sometimes are Ok and other times not Ok. I doubt if we'll be able to offer much more help without seeing some code. Perhaps start off with the Database intialisation and login code as there's obviously an issue with that, or Zip the whole project (and Database if possible) and attach it here.

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