TWAIN Working Group

Newsletter Signup
Donate
Help keep TWAIN free
  • About TWAIN
    • What’s New?
    • News
    • Events
    • Membership
    • Consider a Donation
    • Contact Us
  • Why TWAIN?
  • Developers
    • Driver Developer
    • Application Developer
    • TWAIN Features
    • Specification & Tools
    • Self Certification Process
  • Support Forums
  • Scanner End-User
  • Find Certified Drivers
    • Facebook
    • LinkedIn
    • Vimeo

Subsequent calls – increase response time

Forums › TWAIN Classic › Subsequent calls – increase response time

  • This topic has 3 replies, 2 voices, and was last updated 13 years, 2 months ago by gabe.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • December 18, 2007 at 9:37 pm #22261 Reply
    JS
    Participant
    • Topics - 1
    • Replies - 1
    • Total Posts - 2

    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;

    December 21, 2007 at 11:00 am #24230 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    no, I’ve never seen that. Is this reproducable on the i30 in simulation mode? Is that (native) c++?

    .

    December 21, 2007 at 3:02 pm #24231 Reply
    JS
    Participant
    • Topics - 1
    • Replies - 1
    • Total Posts - 2

    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.

    December 21, 2007 at 3:05 pm #24232 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    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
    .

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Subsequent calls – increase response time
Your information:




Quick Links

Service Providers
TWAIN Support Forums
Membership
Contact Us
Privacy Policy

Newsletter Signup

TWAIN Working Group Family

TWAIN Working Group
TWAIN Direct®
TWAIN Resources
TWAIN Certified Drivers
PDF/raster

  • Facebook
  • GitHub
  • LinkedIn
  • Vimeo

Recent Topics

  • could not open the twain source. Make sure there is a valid source for your sca
  • Changing TWAIN driver defaults
  • Scanner starts transfer when console gets closed (CITRIX)
  • Kodak RFS 3600
  • Didn’t save enough file scan
  • Quarterly Newsletter
  • TWAIN Working Group Membership
  • Logo Usage
  • TWAIN License
  • Contact Us
Privacy Policy • Privacy Tools • Copyright © 2021 TWAIN Working Group • by iHwy, LLC • Log in

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.