|
-
Aug 16th, 2012, 08:17 AM
#1
Thread Starter
Fanatic Member
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 ?
-
Aug 16th, 2012, 08:35 AM
#2
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?
-
Aug 16th, 2012, 08:52 AM
#3
Thread Starter
Fanatic Member
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
-
Aug 16th, 2012, 08:53 AM
#4
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?
-
Aug 16th, 2012, 08:55 AM
#5
Thread Starter
Fanatic Member
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
-
Aug 16th, 2012, 09:28 AM
#6
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
-
Aug 16th, 2012, 09:48 AM
#7
Thread Starter
Fanatic Member
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
-
Aug 16th, 2012, 09:59 AM
#8
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 ?
-
Aug 16th, 2012, 10:22 AM
#9
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
-
Aug 16th, 2012, 10:25 AM
#10
Thread Starter
Fanatic Member
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
-
Aug 16th, 2012, 11:25 AM
#11
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?
-
Aug 17th, 2012, 03:35 AM
#12
Thread Starter
Fanatic Member
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.
-
Aug 17th, 2012, 03:47 AM
#13
Re: Why does my app work fast on my computer when running in vb6.0 - but not when exe
 Originally Posted by JamieWarren09
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|