Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9130429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:57:52+00:00 2026-06-17T07:57:52+00:00

I am trying to profile my YUI3 application using the Google Speed Tracer. Here

  • 0

I am trying to profile my YUI3 application using the Google Speed Tracer.

Here is the first snapshot:

enter image description here

So far so good, ST indicates a place taking 195ms. So, I zoom on it:

enter image description here

Even better, right? Here ST takes me to the offending line:

enter image description here

But what’s next? I mean, here is the line:

return ('scrollTop' in node) ? node.scrollTop : Y.DOM.docScrollY(node);

And since the stack trace ends here I assume that node.scrollTop is returned, which is just a JS property access.

So what is the logic behind the claim that style recalculation took place at this point yielding 36ms execution time?

Can anyone explain it to me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:57:53+00:00Added an answer on June 17, 2026 at 7:57 am

    What is most likely occurring here is that you have accumulated changes to the DOM and/or stylesheets that require a style recalculation. But most rendering engines (definitely WebKit) defer style recalculation (as well as layout and rendering) as long as possible. In the best possible case, style recalculation, layout, and rendering all run in sequence once the current event handler returns control to native code.

    But there are a number of things that can force an early recalculation or layout. The most common is that you access a property (e.g., scrollTop) on a DOM element that has to be computed. Other properties such as offset[Left Top Width Height] also commonly force a style recalculation and layout. The browser can’t do this “in the background” because the rendering engine is (for the most part) single-threaded with the Javascript VM, so it typically has to wait for you to call into native code.

    It’s a bit hard to tell from your screenshots, but from what I can see it looks like you have a pretty big chunk of HTML being parsed right before this event (18ms worth), which could amount to a significant amount of style recalculation and layout (the latter of which takes 26ms just afterwards). I also see TableView._defRenderBodyFr() in your stack trace, which leads me to suspect that just before this getter was called, you have added/mutated a fair number of table rows. The TableView code most likely built up a big HTML string, but you only paid for the HTML parsing (and DOM construction) when it was set in innerHTML, but as soon as the code tried to access a property (in this case scrollTop) you paid for the style recalculation and layout.

    You should be able to break these costs into smaller chunks (thus giving the UI thread a chance to breathe and generally feel more responsive) by reducing the number of rows affected by each mutation. I’m not a YUI expert, so I can’t tell you how you would do it in their TableView, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to profile a GO program using the procedure described here: http://blog.golang.org/2011/06/profiling-go-programs.html .
I'm trying to profile a .NET application in Visual Studio using the build-in profiler.
I'm trying to profile my application using Instruments on the device itself. Specifically, I'm
I am trying to profile an application which uses Ninject. I am using ANTS
I am trying to profile an application and I have a lot of instances
I am trying to profile my java application with JProbe. I am little confused
I'm trying to create a simple profile tab which includes a gravatar using Devise,
I was trying to learn how to profile a simple python program using hotshot,
For last two days I am trying to profile a java application on a
I'm trying to profile a simple application in java, which basically only opens an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.