Jump to content
Sign in to follow this  
robhunter

Internet Explorer slows script

Recommended Posts

robhunter

Hi,

I'm developing a script using IE functions, everything works great, without errors nor problems... But there's something that frustrates me.

When I run the script it takes ~130 secs to run, but if I open manually an IE window, and then run the script, it only takes ~25 secs to run... Maybe it's windows and it fantastic memory administration?

Can someone help me decreasing the run time without always having an IE window open..?

Thanks in advice!

Share this post


Link to post
Share on other sites
JohnOne

No, your code has to load Internet Explorer and its dependencies.

I'm going out on a limb here but if IE is already running, its half the battle, and your script will repond quicker.

Thats my logic anyway.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
robhunter

No, your code has to load Internet Explorer and its dependencies.

I'm going out on a limb here but if IE is already running, its half the battle, and your script will repond quicker.

Thats my logic anyway.

I understand...

So I must use RUN function to load IE and it will improve run time... But I need to have the windows hidden, to run everything on background... Also, if I RUN IE, wont it take so long to load every time I run the script? I need the script to be finished in less than 30 secs

Share this post


Link to post
Share on other sites
JohnOne

Well I actually thought you were using _IEAttach() with your manually started browser instead of _IECreate() to start a new instance.

Anyway, with this simple test, I get shorter times, when an IE window is already loaded than when it is not.

#include <IE.au3>
$timer = TimerInit()
$oIE = _IECreate("www.google.com")
MsgBox(0,"result",Round(TimerDiff($timer),2))

Although only marginal, nowhere 100 seconds.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
robhunter

Well I actually thought you were using _IEAttach() with your manually started browser instead of _IECreate() to start a new instance.

Anyway, with this simple test, I get shorter times, when an IE window is already loaded than when it is not.

#include <IE.au3>
$timer = TimerInit()
$oIE = _IECreate("www.google.com")
MsgBox(0,"result",Round(TimerDiff($timer),2))

Although only marginal, nowhere 100 seconds.

I have various scripts that does the same with different URL... So I thought if I do _IEAttach I can mess everything :S I have thoose scripts running at the same time.

Maybe the best way is to RUN IE and then _IEAttach()? I need clean and fast results :)

Share this post


Link to post
Share on other sites
JohnOne

Are you certain of your findings? and its not just that some urls load quicker than others, or that simply somtimes the url will load faster than another time.

The behaviour you decribe seems rather odd to me.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
robhunter

Are you certain of your findings? and its not just that some urls load quicker than others, or that simply somtimes the url will load faster than another time.

The behaviour you decribe seems rather odd to me.

Basically what I need is to know if there's any way to quickly use IECreate without having an IE window already open... If there's no, then I just leave a window open :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.