|
-
Feb 23rd, 2001, 11:27 AM
#1
Thread Starter
Hyperactive Member
I'm not sure that I'm even stating this correctly but...
My app has a reference to an activex dll that I wrote. It contains all my buiness objects to separate them from the presentation layer...
Now, when I first start the app, I notice a lag time when one of the business objects in the dll is first called. It appears that this is due to the computer having to load the dll initially since all subsequent calls to the objects in that dll are much quicker.
How do I preload(?) the dll so that by the time the app finishes starting there won't be that initial lag. I understand that the lag will be now shifted to the app's initial load but that's fine.
I saw something about this somewhere but I can't seem to find it again.
Thanks in advance.
Achichincle
VB6 (VSEE SP5, W2KPro)
ASP
HTML
-
Feb 23rd, 2001, 11:49 AM
#2
Retired VBF Adm1nistrator
Perhaps you could have a splash screen ?
Then when the splash screen loads, you load but dont show another form. That form then contains all the dll references.
- jamie
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Feb 23rd, 2001, 11:55 AM
#3
Thread Starter
Hyperactive Member
That's what I'm trying to do. I'm just getting bogged down on the how to get the dll to load.
I suppose I could just call on a 'Startup' procedure in the dll but isn't there another way with typelibs?
Achichincle
VB6 (VSEE SP5, W2KPro)
ASP
HTML
-
Feb 23rd, 2001, 01:05 PM
#4
I think I have done that...
let's say I have in my referenced dll some 'huge' tables
like:
MyTable(0)=1234
...
MyTable(9876)=19283746
in a class named MyClass in the class initialize event
Of course, I have
Public MyTable(9876) as long 'in a module
Dim asd as MyClass 'just after Option explicit
and at form load event,
Set asd = new MyClass
that will bring you to the class initialize event and your table will be in memory for good.
the lag time is at app start only and table will be in memory as long the app is running.
does it answer your question?
-
Feb 23rd, 2001, 01:19 PM
#5
Thread Starter
Hyperactive Member
Thanks Yaz...
That's pretty much what I ended up doing. Creating a class solely for the purpose of loading some global objects and classes then created an instance of that object during startup.
Achichincle
VB6 (VSEE SP5, W2KPro)
ASP
HTML
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
|