Dynamically Loaded XAPs and Internet Explorer Memory Issue

4 posts, 0 answers
  1. Mike
    Mike avatar
    6 posts
    Member since:
    Jul 2010

    Posted 14 Dec 2010 Link to this post

    I’m running into an issue and was wondering if anyone might shed some light on possible solutions I might be missing.  We’re using the framework not as a testing tool but as an entry tool to automate the entry of information into our Silverlight application.  I wanted to mention this as the nature of what we are doing plays into the number of iterations any given task must run through before the set is complete.

    The set of commands run successfully for the first 60 – 70 items but at that point WebAii begins to have trouble communicating with Internet Explorer.  After some investigation it appears that at the point of trouble IE’s memory use has ballooned to over a gig.  By doing nothing but logging in and then looping back and forth between two Silverlight URLs in our app I can observe the issue, but attempting the same on other Sites doesn’t seem to recreate it.  For the moment I’m calling Refresh() on the browser as that seems to drop the memory use down to normal levels.

    I have a theory on what’s happening and was wanted to see if I may be correct and if so, if there are any better alternatives to simply calling Refresh().  Our application is composed of one XAP file which houses a shell which fills itself with content which is housed in multiple other XAP files.  As I am usually interacting only with one particular section, it is possible that actions are performed on that section and then an action resulting in a navigate is performed while the framework is still busy in the background injecting its connection into other XAPs which the Application is still trying to load.  My guess is that due to the navigate occurring before the framework is really ready that it is forgetting about any connections/objects/etc that it was in the process of constructing and that memory is never reclaimed until IE’s active in-memory cache is cleared by the refresh (or process termination).

    I am waiting until the Browser reports ready, and have gone so far as to implement a request/response counter/matcher using the WebAii proxy to supplement Browser ready checks but neither are accurately representing whether the Silverlight application is actually ready with all the sub-components loaded.

    Is there a better way to determine Silverlight application readiness?  I’d like to try and avoid performing element find checks to determine module loading as I would like to be able to utilize the same check code everywhere in the app.  If this is problematic, is there a way to tell the framework to clear or otherwise refresh itself or the disconnected objects it may have floating in IE's memory without doing a full browser refresh?

    Any insight or help is much appreciated.

  2. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 16 Dec 2010 Link to this post

    Hi Mike,

    We have not heard of excessive memory use as you describe before. Admittedly our other customers are running real tests and don't perform a lot of browser reloads as you describe.

    So let me start by asking a few basic questions:

    1. do you see memoyr use increase like this during manual use of your application, or does it only seem to happen while running your framework code?
    2. Would it be possible for us to directly access your application so that we can try and reproduce this memory usage problem?
    Regarding waiting for the Silverlight application to be ready, there is no standard or better way to follow. The Silverlight engine actually runs with the PC, like a real program does (e.g. Word, Excel, etc.). It's been our experience that the best way is to wait for something visually within the application. Or if possible add a special visual queue that the application sets and clears which WebAii can interrogate for readiness.

    Regards,
    Cody
    the Telerik team
    Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
  3. Mike
    Mike avatar
    6 posts
    Member since:
    Jul 2010

    Posted 17 Dec 2010 Link to this post

    Just to make sure we're on the same page, I added the call to Browser.Refresh() at the end of each iteration to remedy the memory issue as it seems to clear the problem up.

    To answer your questions:
    1. It doesn't seem to occur when someone is actually driving the Silverlight application.  It jumps around a bit, but that's to be expected.  In regular use it drops back down and the jumps are temporary.  This is just off the top of my head as it's been a week or so since I checked but I don't think it jumped over 200 megs when manually clicking around the app and hovered around 120 megs when it wasn't in one of its temporary jumps.
    2. I checked and although it would be possible to set you up with access to our application and the sample automation code I'm running, in order to do that we would need to have an NDA - NSA document signed before we could provide a login to our application.  Is that something that would be acceptable on your side?  I realize this is in regards to the free framework, and very much appreciate any aid that can be offered.

    Thanks Cody,
    Mike
  4. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 20 Dec 2010 Link to this post

    Hello Mike,

    We have no problem signing an NDA with you. We do this often with customers who are developing sensitive sites. I recommend opening a new support ticket for this issue and attaching your NDA form to that ticket. I'll have it signed by our Executive Officer and returned to you.

    Kind regards,
    Cody
    the Telerik team
    Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
Back to Top