M
MR
Hi,
it has been observed that when we try to instantiate
a .Net dll for the first time in a session (e.g. from an
exe in .Net), it takes almost 10 times compared to
subsequent instantiations.
We have A.exe, developed in VB.Net, where, in a button
click, we are instantiating the Test.dll also developed in
VB.Net. We run three instances of A.exe simultaneously
(say A1, A2 and A3 are the three instances). Clicking on
the button in A1, A2 and A3 for the first time, it takes
almost 2000 miliseconds to instantiate the dll in each
instance (A1, A2, A3). Clicking the second time onwards,
the time for instantiation reduces to 130 miliseconds.
My questions are:
1. As I understand a dll can take more time in the first
instantiation. But why is it taking more time in the first
click from each of the exe instances instead of just the
very first click from A1? Why is it session/connection
dependent?
2. Is there any way we can ensure that the dll
instantiates in the fastest possible time in the very
first try?
It would great if someone can please help.
Thanks,
M.R.
it has been observed that when we try to instantiate
a .Net dll for the first time in a session (e.g. from an
exe in .Net), it takes almost 10 times compared to
subsequent instantiations.
We have A.exe, developed in VB.Net, where, in a button
click, we are instantiating the Test.dll also developed in
VB.Net. We run three instances of A.exe simultaneously
(say A1, A2 and A3 are the three instances). Clicking on
the button in A1, A2 and A3 for the first time, it takes
almost 2000 miliseconds to instantiate the dll in each
instance (A1, A2, A3). Clicking the second time onwards,
the time for instantiation reduces to 130 miliseconds.
My questions are:
1. As I understand a dll can take more time in the first
instantiation. But why is it taking more time in the first
click from each of the exe instances instead of just the
very first click from A1? Why is it session/connection
dependent?
2. Is there any way we can ensure that the dll
instantiates in the fastest possible time in the very
first try?
It would great if someone can please help.
Thanks,
M.R.