473,789 Members | 2,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Object reference terribly slow with certain user profiles

Hi, group!

Here is some interesting problem:

Our company has developed a large VB6 application that runs very smoothly on
most environments.

However, all of a sudden one of our customers (unsing WinNT SP6) experienced
a dramatic
performance drop. We investigated, and it turned out that it depends on the
user that logs on.
Only certain users with user profiles have those performance troubles with
our software.
After further investigation it turned out that referencing propertys and
methods
of class instances through unspecific object variables (declared "as
Object")
ist over 100 times slower than normal.
For example, this works fine:

Dim o as MyInterestingCl ass
Dim i%
Set o = MyInterestingCl assInstance

for i%=1 to 100
o.DoSomething()
next
This, however, is more than 100 times slower:

Dim o as Object
Dim i%
Set o = MyInterestingCl assInstance

for i%=1 to 100
o.DoSomething()
next
Okay, we all know that using unspecific object variables can slow things
down, but not 100 times!
And, as I said, the stunning thing is that only certain users with user
profiles have the problem.

Has anyone heard of such a problem or knows the possible cause of that? How
can user profiles
affect VB6 .EXE files in that way? BTW: We tried to compile to native code
instead of P-Code -
it made no difference at all!

---

Helmut Hoerner
he************* ******@hhsoft.c om
(pls. leave out the nospam part if you want to send me an email)
Jul 17 '05 #1
3 3893
"Asperamanc a" <as*********@ya hoo.com> schrieb im Newsbeitrag
news:3b******** *************** ***@posting.goo gle.com...
Some rather obvious suggestions:
Do you use the newest VB6 service pack (SP 5)?
Try to turn off code optimization if you use it, in my experience it
makes more trouble than it's worth.
Have you ananlyzed the differences between there users?
*) Different rights? Does the application have to check the user's
access rights somehow?
*) Different network access settings? If the application accesses a
network, this can slow things down
*) Different applications running? Is enough physical memory
available?

Robert


Hi Robert,

thank you for your suggestions.

- With "Compile to P-Code" there are no optimization settings, and as the
problem occures with "P-Code" as well as with "Native Code" I have little
hope in the different optimization settings.
- Actually, for some deployment reasons we still stick to VB6 SP3. Of
course, you are right, we should investigate if SP5 could fix the problem
- As for the network access: The problem has *nothing* to do with file or
network access. It's simply referencing methods and variables through object
variables.
- Physical Memory ist okay, and there seem to be no difference in running
backround tasks for the different users.

Our latest guess is that with the user profiles someting in the "current
user" part of then registry could get messed up (probaply too many
registered ActiveX objects, or something like that).

Regards,

Helmut Hoerner
he************* ******@hhsoft.c om
(pls. leave out the nospam part if you want to send me an email)
Jul 17 '05 #2
As I see it, the only difference is early time binding vs late time
binding. The only additional chore for late time binding is finding
the actual address of the function you want to call from a table. I'm
not entirely sure, but I think in VB6 classes are just COM objects,
internally, so this task would be up to the OS (please correct me
someone, if I'm wrong).

Therefore, my best guess is that NT 4.0 is a bit screwed up (which is
a safe guess anyway, from my experience). Of course, that wouldn't be
a lot of help.

My best suggestion is trying to avoid the generic Object. That can be
though, and sometime outright impossible, I know. Maybe try if using
an Interface helps - an Interface where DoSomething is defined, which
is implemented by the
MyInterestingCl ass. Then, you wouldn't have to declare the variable as
Object, but rather as MyInterface, and late time binding should not be
necessary for DoSomething.

Hope that helps

Robert
Jul 17 '05 #3

"Asperamanc a" <as*********@ya hoo.com> wrote in
news:3b******** *************** ***@posting.goo gle.com...
As I see it, the only difference is early time binding vs late time
binding. The only additional chore for late time binding is finding
the actual address of the function you want to call from a table. I'm
not entirely sure, but I think in VB6 classes are just COM objects,
internally, so this task would be up to the OS (please correct me
someone, if I'm wrong).
I don't know about that for sure, but the problems we have seem to suggest
that you are right. Obviously the the task *is* up to the OS, or how else
could the performance suddenly get worse?
Therefore, my best guess is that NT 4.0 is a bit screwed up (which is
a safe guess anyway, from my experience). Of course, that wouldn't be
a lot of help.
Yep.
My best suggestion is trying to avoid the generic Object. That can be
though, and sometime outright impossible, I know. Maybe try if using
an Interface helps - an Interface where DoSomething is defined, which
is implemented by the
MyInterestingCl ass. Then, you wouldn't have to declare the variable as
Object, but rather as MyInterface, and late time binding should not be
necessary for DoSomething.


Actually, today we have tried just that - and you know what: It helps!!!

Still, it's very annoying and a lot of work, but at least we have a
workaround now! Thank you very much for your time and your suggestions!

---

Helmut Hoerner
he************* ******@hhsoft.c om
(pls. leave out the nospam part if you want to send me an email)

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

38
5238
by: VK | last post by:
Hello, In my object I have getDirectory() method which returns 2-dimentional array (or an imitation of 2-dimentional array using two JavaScript objects with auto-handled length property - please let's us do not go into an "each dot over i" clarification discussion now - however you want to call - you call it ;-) array contains records of all files in the current dir. array contains records of all subs in the current dir
9
2181
by: Moe Sizlak | last post by:
Hi There, I am trying to write the selected value of a listcontrol when a button is clicked and I keep getting the error "object not set to a reference of an object". The libox itself is in a usercontrol and all i'm really needing to do is get the selected value when the button is clicked on the form. Can someone tell what I need to include in my page to get this working ? Moe <><
12
8706
by: Jim Hammond | last post by:
I am passing the whole object instead or parameters in my select and update methods. I can get the updated object if I set UpdateMethod, let ASP.NET autogenerate an update button, and then press update after making changes, but I don't want that update button. How can I get the updated object when the user presses one of my other action buttons?
50
5740
by: diffuser78 | last post by:
I have just started to learn python. Some said that its slow. Can somebody pin point the issue. Thans
26
5694
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized several parts of the DOM, but this does not include the window object. Thank you
12
2031
by: Belebele | last post by:
Suppose that a class A depends on class B because an object of class B is passed into A's constructor. See below: class B { ... }; class A { public: A(B const& b); ... };
2
2855
by: Paul Lemke | last post by:
Hello, I currently have an application that uses authenticates users via NTLM. I would like to provide a user a directory listing of a folder. Everyone has read access to the folder, but the only folders that should show up are ones that allow them to modify sometime. I can list the directories/files just fine using directoryinfo/ fileinfo. But how can i tell if the current authenticated user has NTFS write/modify permissions on those...
9
2371
by: =?Utf-8?B?Sm9obiBBdXN0aW4=?= | last post by:
I have an app that prints entry tickets. If the printer driver is not set up exactly to detect the black mark on the back of the ticket, the tickets do not print correctly. Because of this, all users are logging on with the same user name to ensure they get a correctly configured printer driver. The application runs on a Terminal Server via the RDP client. In order to audit the actions of users, it is necessary to identify each user....
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10412
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9986
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9021
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4093
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3703
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.