[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Menu

#618 NSISdl 100% CPU usage during DNS resolution

2.0 Series
closed-fixed
Plugin (101)
5
2007-05-05
2007-05-05
Greg Hazel
No

If AsyncDNS is enabled, the NSISdl eats 100% cpu while the DNS resolution is occuring.
This is because if m_dns->resolve() returns 1 no waiting has occured, and the plugin tight-loops on run(). Something like this would fix it in a reasonable way:

else if (a == 1)
{
m_state=STATE_RESOLVING;
if (m_dns->m_thread)
{
WaitForSingleObject(m_dns->m_thread, 100);
}
break;
}

But you would have to make m_thread public. This is slightly better than a Sleep() hack, because it's alertable.

Discussion

  • Amir Szekely

    Amir Szekely - 2007-05-05

    Logged In: YES
    user_id=584402
    Originator: NO

    Thanks, fixed by applying the original speed-up patch with the sleeps in statuses 0 and 1.

     
  • Amir Szekely

    Amir Szekely - 2007-05-05
    • assigned_to: nobody --> kichik
    • status: open --> closed-fixed
     
  • Greg Hazel

    Greg Hazel - 2007-05-07

    Logged In: YES
    user_id=731668
    Originator: YES

    Sorry, which speed-up patch?

     

Log in to post a comment.