Menu

#190 Multithreading support

open
nobody
None
5
2012-10-21
2010-11-10
Anonymous
No

I am using webclient at a servlet. If I make concurrent calls to the servlet the processing speed of htmlUnit decreases a lot. In other posts I read that htlmunit does not support multithreading. Could my case related to that?

Thanks. Javier.

Discussion

  • RBRi

    RBRi - 2010-11-10

    Yes, that's possible. But the most problems with multithreading are things like throwing a ConcurrentModificationException or that one thread disturbs another.
    The latest snapshof fixes a problem with a lock, that was used by all instances of DomNode. Maybe this helps a bit.
    Can you please try the latest snapshot.

     
  • Marc Guillemot

    Marc Guillemot - 2010-11-11

    Do you use a single WebClient instance shared among the requests? If yes, this is not supported (and will probably never be supported).

    How many concurrent calls do you have when you notice performance degradation? Is it possible, that it is the normal load due to the number of requests * single task load?

     
  • Anonymous

    Anonymous - 2010-11-12

    Thanks for all of your responses.

    I am using distinct instances between the threads. In fact, each one is created at a different servlet instance. Calls to the servlet are concurrent. I notice performance degradation very sooner, when there are 10 instances running simultaneously.
    I will try with the latest snapshot and I will tell you how it works.
    Javier.

     

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.