Results 1 to 5 of 5

Thread: Dynamic iframe II slowdown problem

  1. #1
    Join Date
    Jun 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Dynamic iframe II slowdown problem

    Hi all!!

    My first ever post to these forums so be gentle!

    I am using the dynamic iframe script II on my integramod (phpbb) website. I am using iframes as a wrapper for content inside portal pages on the main site. In these wrappers I have sub-sites (all of which are on the same domain). So, the dynamic resizing works brilliantly apart from one small problem.

    Lets say i go to a portal page with the iframe on it. The portal page loads and then the iframe is populated with the subsite. If I then start to navigate around the subsite within the iframe all is well for the first 15-20 clicks (ie, the frame resizes for the new content). After this though the resizing of the frame starts to take progressively longer and longer with every click until it appears to hang (if you wait long enough it does come back). If you then reload the whole portal page it will be fine again for another 20 or so navigations and then start to slow down again.

    This happens on all 4 of the subsites I have running in the iframes. All 4 subsites work fine when navigated around directly (not in the iframe).

    it seems to me there is some sort of recurring loop somewhere but not being a javascript expert (in fact - i am a total novice) I have no idea where to start looking!

    Any suggestions greatly received!!!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Give us a link to your site and tell us what browser(s) you are experiencing this in.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jun 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi

    I have sent you an email with a test login to the site

    Thanks!!

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Yeah, I see what you mean, big time slow down in IE. No problem in FF. I didn't test any others. I Thought it might be a memory problem so I tracked memory usage in Task Manager. No real problem with memory usage but I noticed actual CPU usage was spiking and then getting pegged a 100%. The more I loaded pages into the iframe in IE after that the longer CPU usage would remain pegged at 100% and this corresponded exactly with the amount of time that the frame was blank. I then had a look at your source code and saw that you had commented out this line:

    Code:
    //currentfr.detachEvent("onload", readjustIframe) // Bug fix line
    Those two little red slashes at the beginning make it a comment. Why did you do that? I'm like 99% sure that this is the problem as that is an IE specific line designed to prevent multiple instances of the resizing event. Without that line, each time you load something into the iframe an event gets attached to it. After 20 loads, you have 20 events all firing at the same time. Almost has to be it. Just remove the red slashes and you should be fine.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Jun 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    Hi

    Uncommenting that line has indeed fixed it!! Many thanks

    I am by no means an expert on this stuff In fact this is my first site build so most of it was learnt from forums, web tutorials and trial and error! I actually got the dynamic drive code from a forum and that line was already commented out. I will try and remember where I got it and post a commment about this.

    Thanks again for you help!!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •