Jump to content

Recommended Posts

Posted (edited)

Hello everyone,

I made a script that uses the _IENavigate method and noticed that the attached IE process memory usage keeps increasing by ~25MB, no increasing accords once the _IENavigate is called, the increasing starts exactly when the page is almost finished loading, I did a little search and found some topics regarding this matter with no actual fix for this issue.

 

I tried using _IECreate then _IEQuit once the job is done, but that didn't fix the problem and actually led to another one, a process keeps hugging the memory and increasing, while adding +2 more IE processes, if I keep the script running for about 1 hour i end up with +5 IE processes running in the background plus the main IE window process.

I'm using Windows 8 x32, latest AutoIt and SciTE.

 

EDIT: The script work's on a website that requires special access, can't share the code, but I tested it on Google and it caused the same problem, I use _IENavigate in my code once every 10-15 seconds.

Edited by Palestinian
Posted (edited)

Wouldn't this be something to tell Microsoft about? _IENavigate isn't doing anything in IE that is out of the ordinary. Doing a little googling I find that others are having the same issue, and in other languages than AutoIt.

http://stackoverflow.com/questions/904478/how-to-fix-the-memory-leak-in-ie-webbrowser-control

Edited by BrewManNH

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

  Reveal hidden contents

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Posted (edited)

I guess thats a dead end then, seeing how people have had this problem since Windows Vista, The work around I tried was _IEQuit and _IECreate each time the job is done, but as mentioned in the main post, that resulted in extra IE processes running in the background plus the process thats hugging all the memory, I'll double check it just to be sure, might be something in my script.

 

EDIT: Adding a 1 second delay between _IEQuit and _IECreate seems to fix the problem, checked task manager and the IE process gets released and a new one is created, not giving it a sleep time the process remains and a 3rd process starts '_IECreate with invisible parameter opens 2 IE processes', so that issue is fixed, now I'm left with the memory consumption/leak when using _IENavigate.

 

#include <IE.au3>

$i = 0
While 1
    $i = $i + 1
    $oIE = _IECreate("about:blank",0,0)
    _IENavigate($oIE, "www.google.com")
    _IEQuit($oIE)
    TrayTip('',$i,1)
    If $i = 5 then ExitLoop
    Sleep(1000)
WEnd
Edited by Palestinian
Posted
  On 3/22/2014 at 5:27 PM, Danp2 said:

Are you just refreshing the page? If so, have you tried using the Refresh action of _IEAction?

 

Wish it was that easy, but it isn't, each page I navigate to belongs to a unique case in the database with a unique URL

Posted
  On 3/22/2014 at 5:33 PM, JohnOne said:

No leak here in IE11, also a webbrowser control is IE7 and quite different to IE itself.

 

Did you use the script in the 3rd post? I have IE 10, going to upgrade now

Posted

On Vista the memory usage rises every time .navigate is called. I ran this little snippet for a few minutes and the IE memory usage got to over 600MB, this is on Vista x86 IE9.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

  Reveal hidden contents

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Posted

on win7 pro x64 with IE 11.0.9600.16521

after 26 minutes IE increased their consumption of memory from 50 to 92 MB.

But in the beginning as I watched it seemed that stays within the range of about 55MB (increased, decreased, increased ..... memory usage)

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

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
×
×
  • Create New...