Menu

#20 Fast adding of user-list (dcclient.cpp)

open
nobody
None
5
2009-07-12
2009-07-12
No

See patch

Discussion

  • Andrey Karlov

    Andrey Karlov - 2009-07-12

    dcclient patch

     
  • Edward Sheldrake

    I would be surprised if this patch has much effect, isn't the main change that one DCClient will hog the main application thread while it processes all it's messages from dclib?

    I think there is a memory leak since you return early on the NickList message, then DCMsg is not deleted. I was assuming modern hubs do not send any NickList messages anyway,

     
  • Andrey Karlov

    Andrey Karlov - 2009-07-13

    second dcclient patch

     
  • Andrey Karlov

    Andrey Karlov - 2009-07-13

    On my system with this patch adding of nick-list with more than 3000 elements takes ~2sec, with old version - 6-8sec.
    >that one DCClient will hog the main application thread while it processes
    all it's messages from dclib?
    Yes, but really we have this situation only when DCClient "starts" because hub send to us a lot of messages (ex, long nick-list), processing of nick-list is potentially long operation and i set timer interval to 150msec for fast getting of all portions of nick-list. In other sistuations DCClient will not hog the main application thread.
    > I think there is a memory...
    Fixed.

     
  • Andrey Karlov

    Andrey Karlov - 2009-07-14

    What about using QThread instead of QTimer? something like(in QThread ckass):
    while (true){
    DCClient_getMessages();
    usleep(300);
    }
    And DCClient will not hog the main application thread.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.