RenderBlock::calcMinMaxWidth() shouldn't call calcInlineMinMaxWidth/calcBlockMinMaxWidth (which iterate over all children) if it's not a table cell and has fixed positive width, since in that case it overwrites m_minWidth and m_maxWidth anyway. This is a fairly common case, and a very easy fix that could improve performance. I think this also applies to RenderFlexibleBox.
I forgot about this bug when I filed bug 12049. Leaving this one open for the RenderFlexibleBox stuff. Also see other comments in bug 12049.
Created attachment 14016 [details] Possible patch adapting the fix from Bug 12049. I think this might be correct. I ran the layout regression tests and there were no failures.
Comment on attachment 14016 [details] Possible patch adapting the fix from Bug 12049. The way flexible boxes are eventually going to work is that width will not dictate the minwidth or maxwidth. That makes this optimization (eventually) pretty irrelevant for flexboxes. Also a flexbox can't ever be a table cell so the !isTableCell() bit is unnecessary.
@Alan - this optimization is still applicable or we can close this?
(In reply to Ahmad Saleem from comment #4) > @Alan - this optimization is still applicable or we can close this? looks dated to me.