If my goal is to test the rendering speed in IE of a specific web page through repeated loads (merely using a javascript onload event for timing and viewing the page doesn't cut it), what would be a good way to do it?
My current attempt was by using the IE WebBrowser object in VB and C#, though I'm open to other suggestions.
Below is some simple VB code, though I've tried something similar in C#. I've also tried creating a new web browser control for each test (this made things worse). I've also tried using the events themselves rather than using a readystate loop. In all cases, the tests take longer and longer to run, though using reload
complete instread of navigate2
seems to help a little, perhaps implying the problem is some sort of history issue.
For cnt = 1 To 100
timer = GetTickCount()
Form1.WebBrowser1.Navigate2 "http://www.example.com"
While Form1.WebBrowser1.ReadyState <> READYSTATE_COMPLETE And GetTickCount() - timer < 5000
Sleep 50
DoEvents
Wend
Debug.Print GetTickCount() - timer
Next