The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SHDocVw.WebBrowser and threads question..
#1
Hi -

I have a dialog which contains a SHDocVw.WebBrowser that I'm using for load testing a third party application. Once I get the MSHTML.IHTMLDocument2 from the browser I sent JavaScript commands in the WM_TIMER block to it like this:
doc.parentWindow.execScript(javaScript "JavaScript")

Everything works well if I open up one of these windows in a 'mac'. If I open two - it also works well. If I open 10 or 20 then things start to break down and I'm not sure if it's a client or server side problem. The client machine isn't under any large load but the windows are extremely sluggish. There are no errors thrown in the console. It appears (but I'm not sure) that JavaScript calls appear to be no-ops or they are timing out. When the next page is loaded (via Navigate()) part of the page may load but it appears that something in the JavaScript thread is on hold.

I can't rule out the server at this point but if I load the web pages on another machine with the same URLs they appear to load just fine.

My questions:
A. Since each of these is running in a separate mac (and thus a separate thread) and are in their own windows - are the SHDocVw.WebBrowser instances independent? Or is there some state that they share? (I'm assuming they share browser cache but nothing more).
B. If there is some shared state - would this be removed if I spawned an external process for each window?

Thanks.


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)