Home › Forums › TWAIN Classic › Subsequent calls – increase response time
- This topic has 3 replies, 2 voices, and was last updated 16 years, 5 months ago by gabe.
- AuthorPosts
I am experiencing an issue where as I make additional calls to operation triplets – the amount of time to complete the call is incrementally increased. This time continues to increase until the the source manager is unloaded. I created a small example that just counts the number of sources by calling the MSG_GETFIRST and MSG_GETNEXT. I call this function in a loop of 100. The first time through it takes .15 seconds. By the 100th time it is taking over 1.5 seconds. Has anyone else seen anything similar? Any thoughts on what to look at? I have seen the same issue on other operation triplets.
Thanks in advance for your help.
John
Code similar to this:
TW_UINT16 rc = (*m_dsmproc)(&m_identity, NULL, DG_CONTROL, DAT_IDENTITY, MSG_GETFIRST, &m_id_source);if (rc != TWRC_SUCCESS) return 0;
long NumberOfSources = 1;
for (int i = 0;;i++)
{
rc = (*m_dsmproc)(&m_identity, NULL, DG_CONTROL, DAT_IDENTITY, MSG_GETNEXT, &m_id_source);
if (rc == TWRC_ENDOFLIST) break;
NumberOfSources++;
}
return NumberOfSources;no, I’ve never seen that. Is this reproducable on the i30 in simulation mode? Is that (native) c++?
.
Yes this is Native C++. I do have the Kodak i30 driver installed – but it was not in simulation mode. I also had some Bell & Howell drivers installed. I have uninstalled all of the drivers except for the Kodak i30 and the Twain32 sample. I have placed the Kodak i30 in simulation mode. Since I have less scanner drivers to spin through – the results were not as dramatic as my first test – but it still clearly shows the response time increasing. In a loop I called my function that enumerates the devices. The first time through it took .06 seconds – the 100th time through it took .2 seconds, by 250th time .44 seconds.
interesting. and odd. no I’ve never seen this. if you send me a test harness I’ll run it here and see a) if your code does this here and b) if I can see anything wrong with it.
truly odd
.- AuthorPosts