S
Sai Kit Tong
We developed an application library to support our system development. This
library, when perform its functions, would access a database to lookup
validation parameter values (we didn't cache the table right now). Normally,
each of its member functions will need to look up multiple values and each
lookup would open&close the databases. With this implementation, we wrote
a test application and a normal function call still only took a few hundreds
of milliseconds. However, when we integrated with our system application,
each similar function call would took almost 10 seconds. From the
debug window, I also observed that 3 Win32 Thread Exits were reported that
didn't occur at all on the test application.
I would appreciate if somebody could help me in this puzzle.
I didn't twist the library to hold on the connection. That significantly
improve the performance - now each call required about ~ 1 second.
Additional information about our case:
- all code in C#
- system application is a large multithread application, which also had
object utilizing sqlconnection
- connection string in the application library
"Provider=Microsoft.JET.OLEDB.4.0;Data Source = lookuptables.mdb"
library, when perform its functions, would access a database to lookup
validation parameter values (we didn't cache the table right now). Normally,
each of its member functions will need to look up multiple values and each
lookup would open&close the databases. With this implementation, we wrote
a test application and a normal function call still only took a few hundreds
of milliseconds. However, when we integrated with our system application,
each similar function call would took almost 10 seconds. From the
debug window, I also observed that 3 Win32 Thread Exits were reported that
didn't occur at all on the test application.
I would appreciate if somebody could help me in this puzzle.
I didn't twist the library to hold on the connection. That significantly
improve the performance - now each call required about ~ 1 second.
Additional information about our case:
- all code in C#
- system application is a large multithread application, which also had
object utilizing sqlconnection
- connection string in the application library
"Provider=Microsoft.JET.OLEDB.4.0;Data Source = lookuptables.mdb"