Loading ...
Sorry, an error occurred while loading the content.

RE: [ydn-javascript] Performance of _initResizeMonitor() in container.js

Expand Messages
  • Satyen Desai
    Hi, Could you port a URL or test page to look at? If it s a reproducible issue, I d like to address it for the next 2.x release. Thanks, Satyen.
    Message 1 of 4 , Jun 29, 2009
    • 0 Attachment
      Hi,
      Could you port a URL or test page to look at?

      If it's a reproducible issue, I'd like to address it for the next 2.x release.

      Thanks,
      Satyen.

      ________________________________________
      From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of Alessandro Vernet
      Sent: Tuesday, June 23, 2009 4:00 PM
      To: ydn-javascript@yahoogroups.com
      Subject: [ydn-javascript] Performance of _initResizeMonitor() in container.js





      I noticed that on larger pages, _initResizeMonitor() can be quite slow. I am
      looking at a fairly large page (700 KB of HTML) where _initResizeMonitor()
      take about a 1 second, on Firefox 3.0, with top-of-the-line hardware.

      By adding some debug, I pin-pointed that almost all the time is spent
      setting oIFrame.style.top. Is this a known issue? Any advice would be
      welcome.

      Alex

      -----
      Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
      Orbeon's Blog: http://www.orbeon.com/blog/
      Personal Blog: http://avernet.blogspot.com/
      Twitter - http://twitter.com/avernet
      --
      View this message in context: http://www.nabble.com/Performance-of-_initResizeMonitor%28%29-in-container.js-tp24175998p24175998.html
      Sent from the ydn-javascript mailing list archive at Nabble.com.
    • Alessandro Vernet
      Satyen, ... I unfortunately don t have that test case anymore, but I suspect that this is happening because I am running _initResizeMonitor() on an onDOMReady
      Message 2 of 4 , Jul 7, 2009
      • 0 Attachment
        Satyen,


        Satyen Desai-2 wrote:
        >
        > Could you port a URL or test page to look at?
        >
        > If it's a reproducible issue, I'd like to address it for the next 2.x
        > release.
        >

        I unfortunately don't have that test case anymore, but I suspect that this
        is happening because I am running _initResizeMonitor() on an onDOMReady
        listener (which corresponds to Gecko's DOMContentLoaded event), and that
        when your code runs on DOMContentLoaded, Gecko hasn't "fully laid out" the
        page yet. I suspect that some interactions with the DOM cause Gecko to
        finish (or do more of the layout), and hence can appear to be very slow. But
        it is not that the operation is slow by itself, but that it triggers the
        browser to do something expensive earlier, which it would anyway do later
        on. Does this make sense?

        Alex

        -----
        Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
        Orbeon's Blog: http://www.orbeon.com/blog/
        Personal Blog: http://avernet.blogspot.com/
        Twitter - http://twitter.com/avernet
        --
        View this message in context: http://www.nabble.com/Performance-of-_initResizeMonitor%28%29-in-container.js-tp24175998p24381259.html
        Sent from the ydn-javascript mailing list archive at Nabble.com.
      • Satyen Desai
        Hi Alex, That use case is fairly common. Most of the examples, which have fairly decent sized/complex DOMs, create containers in onDOMReady listeners (and the
        Message 3 of 4 , Jul 7, 2009
        • 0 Attachment
          Hi Alex,

          That use case is fairly common. Most of the examples, which have
          fairly decent sized/complex DOMs, create containers in onDOMReady
          listeners (and the act of creating the first container, will invoke
          _initResizeMonitor()). e.g:

          http://developer.yahoo.com/yui/examples/container/container-effect.html
          http://developer.yahoo.com/yui/examples/container/dialog-quickstart.html

          The problem doesn't seem to be noticeable for these example pages.

          I'll try adding some weight to them, to see if I can repro, but as
          mentioned, a test page would help.

          Regards,
          Satyen

          On Jul 7, 2009, at 2:01 PM, Alessandro Vernet wrote:

          >
          >
          >
          > Satyen,
          >
          > Satyen Desai-2 wrote:
          > >
          > > Could you port a URL or test page to look at?
          > >
          > > If it's a reproducible issue, I'd like to address it for the next
          > 2.x
          > > release.
          > >
          >
          > I unfortunately don't have that test case anymore, but I suspect
          > that this
          > is happening because I am running _initResizeMonitor() on an
          > onDOMReady
          > listener (which corresponds to Gecko's DOMContentLoaded event), and
          > that
          > when your code runs on DOMContentLoaded, Gecko hasn't "fully laid
          > out" the
          > page yet. I suspect that some interactions with the DOM cause Gecko to
          > finish (or do more of the layout), and hence can appear to be very
          > slow. But
          > it is not that the operation is slow by itself, but that it triggers
          > the
          > browser to do something expensive earlier, which it would anyway do
          > later
          > on. Does this make sense?
          >
          > Alex
          >
          > -----
          > Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
          > Orbeon's Blog: http://www.orbeon.com/blog/
          > Personal Blog: http://avernet.blogspot.com/
          > Twitter - http://twitter.com/avernet
          > --
          > View this message in context: http://www.nabble.com/Performance-of-_initResizeMonitor%28%29-in-container.js-tp24175998p24381259.html
          > Sent from the ydn-javascript mailing list archive at Nabble.com.
          >
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.