Hangs on rendering of a lot of img tags in a document

NEW
Unassigned

Status

()

Core
Layout
P2
normal
8 years ago
7 years ago

People

(Reporter: troy.brophy, Unassigned)

Tracking

(Depends on: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1064 Safari/532.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)

The following Javascript code is running fine in IE7-8, Chrome, Opera and Safari (for Windows), but Firefox just hangs and causes Windows to show it as "Not Responding."

--------------------------------
var hor, ver, rndimg, i;

for (i=0;i<=10000;i++) {
   var hor = Math.floor(Math.random()*1000);   
   var ver = Math.floor(Math.random()*1000)-100;

   var rndimg = (Math.floor(Math.random()*10));

   document.write("<img src='" + rndimg + ".png' style='position: absolute; top: " + ver + "px; left: " + hor + "px;' />");

}

--------------------------------

There are 10,000 iterations to the loop, and three separate random numbers generated in each iteration, but none of the other browsers are choking on this. At most there's a few seconds pause before the page is rendered. If the number of iterations is reduced to 1,000 it works fine in Firefox.

I have taken out the third random number generator and just used a fixed image file, but it's still too much for Firefox to handle at 10,000 iterations.

I've tested this on three different machines, and Firefox hangs on all three.

I have a dual processor machine. One of the two processors hits 100% when I try to load this file in Firefox, but the other processor remains at a normal load.


Reproducible: Always

Steps to Reproduce:
1. Copy the code above into an HTML file (create 10 1-pixel images to use for the image files).
2. Open the file.

- alternately

1. Visit the test page at http://www.adaptabit.com/test

Actual Results:  
The Firefox session hangs, is no longer responsive except for the top-right close (X) button. Clicking anywhere else on the window leads Windows Vista to declare the application "Not Responding". Waiting does not resolve the issue.

Expected Results:  
The software should render the page as IE7-8, Chrome, Safari and Opera do.

Comment 1

8 years ago
Thanks for the report.

This has actually nothing to do with JS. All the action happens in DOM and layout land.

Report below. I will attach the shark profile in a second. The profile is from a debug build (I can't find any nightly builds with symbols, what ever happened to those?).

Reporter, you might want to look into canvas. That's a sane and very fast way of achieving what you are trying to do.

# Report 1 - firefox.mshark - Time Profile of firefox-bin
SharkProfileViewer
# Generated from the visible portion of the outline view
+ 41.1%, nsIFrame::GetNextSibling() const, XUL
| + 40.9%, IsFrameAfter(nsIFrame*, nsIFrame*), XUL
| | + 40.9%, nsLayoutUtils::DoCompareTreePosition(nsIFrame*, nsIFrame*, int, int, nsIFrame*), XUL
| | | + 40.9%, nsLayoutUtils::CompareTreePosition(nsIFrame*, nsIFrame*, nsIFrame*), XUL
| | | | + 40.9%, nsFrameConstructorState::ProcessFrameInsertions(nsAbsoluteItems&, nsIAtom*), XUL
| | | | | + 40.9%, nsFrameConstructorState::~nsFrameConstructorState(), XUL
| | | | | | + 40.9%, nsCSSFrameConstructor::ContentRangeInserted(nsIContent*, nsIContent*, int, int, nsILayoutHistoryState*, int), XUL
| | | | | | | + 40.9%, nsCSSFrameConstructor::ContentInserted(nsIContent*, nsIContent*, int, nsILayoutHistoryState*, int), XUL
| | | | | | | | + 40.9%, nsCSSFrameConstructor::RecreateFramesForContent(nsIContent*, int), XUL
| | | | | | | | | + 40.9%, nsCSSFrameConstructor::RestyleElement(nsIContent*, nsIFrame*, nsChangeHint), XUL
| | | | | | | | | | + 40.9%, nsCSSFrameConstructor::ProcessOneRestyle(nsIContent*, nsRestyleHint, nsChangeHint), XUL
| | | | | | | | | | | + 40.9%, nsCSSFrameConstructor::ProcessPendingRestyleTable(nsDataHashtable<nsISupportsHashKey, nsCSSFrameConstructor::RestyleData>&), XUL
| | | | | | | | | | | | + 40.9%, nsCSSFrameConstructor::ProcessPendingRestyles(), XUL
| | | | | | | | | | | | | + 40.9%, PresShell::FlushPendingNotifications(mozFlushType), XUL
| | | | | | | | | | | | | | + 40.9%, PresShell::WillPaint(), XUL
| | | | | | | | | | | | | | | + 40.9%, nsViewManager::CallWillPaintOnObservers(), XUL
| | | | | | | | | | | | | | | | + 40.9%, nsViewManager::DispatchEvent(nsGUIEvent*, nsIView*, nsEventStatus*), XUL
| | | | | | | | | | | | | | | | | + 40.9%, HandleEvent(nsGUIEvent*), XUL
| | | | | | | | | | | | | | | | | | + 40.9%, nsChildView::DispatchEvent(nsGUIEvent*, nsEventStatus&), XUL
| | | | | | | | | | | | | | | | | | | + 40.9%, nsChildView::DispatchWindowEvent(nsGUIEvent&), XUL
| | | | | | | | | | | | | | | | | | | | + 40.9%, -[ChildView viewWillDraw], XUL
| | | | | | | | | | | | | | | | | | | | | + 40.9%, -[ChildView viewWillDraw], XUL
| | | | | | | | | | | | | | | | | | | | | | + 40.9%, -[ChildView viewWillDraw], XUL
| | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsAppShell::ProcessNextNativeEvent(int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsBaseAppShell::DoProcessNextNativeEvent(int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsBaseAppShell::OnProcessNextEvent(nsIThreadInternal*, int, unsigned int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsAppShell::OnProcessNextEvent(nsIThreadInternal*, int, unsigned int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsThread::ProcessNextEvent(int, int*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, NS_ProcessNextEvent_P(nsIThread*, int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsXULWindow::ShowModal(), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsContentTreeOwner::ShowAsModal(), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsWindowWatcher::OpenWindowJSInternal(nsIDOMWindow*, char const*, char const*, char const*, int, nsIArray*, int, nsIDOMWindow**), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsWindowWatcher::OpenWindow(nsIDOMWindow*, char const*, char const*, char const*, nsISupports*, nsIDOMWindow**), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsPromptService::DoDialog(nsIDOMWindow*, nsIDialogParamBlock*, char const*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsPromptService::ConfirmEx(nsIDOMWindow*, unsigned short const*, unsigned short const*, unsigned int, unsigned short const*, unsigned short const*, unsigned short const*, unsigned short const*, int*, int*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsPrompt::ConfirmEx(unsigned short const*, unsigned short const*, unsigned int, unsigned short const*, unsigned short const*, unsigned short const*, unsigned short const*, int*, int*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsJSContext::DOMOperationCallback(JSContext*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, js_InvokeOperationCallback(JSContext*), libmozjs.dylib
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, js_Interpret, libmozjs.dylib
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, js_Invoke, libmozjs.dylib
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS*, unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsXPCWrappedJS::CallMethod(unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, PrepareAndDispatch, XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsContentPolicy::CheckPolicy(unsigned int (nsIContentPolicy::*)(unsigned int, nsIURI*, nsIURI*, nsISupports*, nsACString_internal const&, nsISupports*, short*), unsigned int, nsIURI*, nsIURI*, nsISupports*, nsACString_internal const&, nsISupports*, short*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsContentPolicy::ShouldLoad(unsigned int, nsIURI*, nsIURI*, nsISupports*, nsACString_internal const&, nsISupports*, short*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, NS_CheckContentLoadPolicy(unsigned int, nsIURI*, nsIPrincipal*, nsISupports*, nsACString_internal const&, nsISupports*, short*, nsIContentPolicy*, nsIScriptSecurityManager*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsContentUtils::CanLoadImage(nsIURI*, nsISupports*, nsIDocument*, nsIPrincipal*, short*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsImageLoadingContent::LoadImage(nsIURI*, int, int, nsIDocument*, unsigned int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsImageLoadingContent::LoadImage(nsAString_internal const&, int, int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsHTMLImageElement::MaybeLoadImage(), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsRunnableMethodImpl<void (nsHTMLImageElement::*)(), true>::Run(), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsContentUtils::RemoveScriptBlocker(), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsContentUtils::RemoveRemovableScriptBlocker(), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, mozAutoDocUpdate::~mozAutoDocUpdate(), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsGenericElement::doInsertChildAt(nsIContent*, unsigned int, int, nsIContent*, nsIDocument*, nsAttrAndChildArray&), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsGenericElement::InsertChildAt(nsIContent*, unsigned int, int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsINode::AppendChildTo(nsIContent*, int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, SinkContext::Node::Add(nsIContent*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, SinkContext::AddLeaf(nsIContent*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, SinkContext::AddLeaf(nsIParserNode const&), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, HTMLContentSink::AddLeaf(nsIParserNode const&), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, CNavDTD::AddLeaf(nsIParserNode const*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, CNavDTD::HandleDefaultStartToken(CToken*, nsHTMLTag, nsCParserNode*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, CNavDTD::HandleStartToken(CToken*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, CNavDTD::HandleToken(CToken*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, CNavDTD::BuildModel(nsITokenizer*, int, int, nsCString const*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsParser::BuildModel(), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsParser::ResumeParse(int, int, int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsParser::Parse(nsAString_internal const&, void*, nsACString_internal const&, int, nsDTDMode), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsHTMLDocument::WriteCommon(nsAString_internal const&, int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsHTMLDocument::Write(nsAString_internal const&), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsIDOMHTMLDocument_Write(JSContext*, unsigned int, long*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, js_Interpret, libmozjs.dylib
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, js_Execute, libmozjs.dylib
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, JS_EvaluateUCScriptForPrincipals, libmozjs.dylib
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsJSContext::EvaluateString(nsAString_internal const&, void*, nsIPrincipal*, char const*, unsigned int, unsigned int, nsAString_internal*, int*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsScriptLoader::EvaluateScript(nsScriptLoadRequest*, nsString const&), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsScriptLoader::ProcessRequest(nsScriptLoadRequest*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsScriptLoader::ProcessScriptElement(nsIScriptElement*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsScriptElement::MaybeProcessScript(), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsHTMLScriptElement::MaybeProcessScript(), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsHTMLScriptElement::DoneAddingChildren(int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, HTMLContentSink::ProcessSCRIPTEndTag(nsGenericHTMLElement*, int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, SinkContext::CloseContainer(nsHTMLTag, int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, HTMLContentSink::CloseContainer(nsHTMLTag), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, CNavDTD::CloseContainer(nsHTMLTag, int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, CNavDTD::HandleEndToken(CToken*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, CNavDTD::HandleToken(CToken*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, CNavDTD::BuildModel(nsITokenizer*, int, int, nsCString const*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsParser::BuildModel(), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsParser::ResumeParse(int, int, int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsParser::OnStopRequest(nsIRequest*, nsISupports*, unsigned int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsDocumentOpenInfo::OnStopRequest(nsIRequest*, nsISupports*, unsigned int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsHTTPCompressConv::OnStopRequest(nsIRequest*, nsISupports*, unsigned int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsStreamListenerTee::OnStopRequest(nsIRequest*, nsISupports*, unsigned int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsHttpChannel::OnStopRequest(nsIRequest*, nsISupports*, unsigned int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsInputStreamPump::OnStateStop(), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsInputStreamReadyEvent::Run(), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsThread::ProcessNextEvent(int, int*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, NS_ProcessPendingEvents_P(nsIThread*, unsigned int), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsBaseAppShell::NativeEventCallback(), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsAppShell::ProcessGeckoEvents(void*), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsAppShell::Run(), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, nsAppStartup::Run(), XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 40.9%, XRE_main, XUL
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |   40.9%, main, firefox-bin
| - 0.1%, nsFrameList::ContainsFrame(nsIFrame const*) const, XUL
| - 0.0%, nsLineBox::IndexOf(nsIFrame*) const, XUL
| - 0.0%, nsLineBox::LastChild() const, XUL
| - 0.0%, nsFrameConstructorState::ProcessFrameInsertions(nsAbsoluteItems&, nsIAtom*), XUL
| - 0.0%, nsLayoutUtils::DoCompareTreePosition(nsIFrame*, nsIFrame*, int, int, nsIFrame*), XUL
| - 0.0%, nsBlockFrame::ReflowInlineFrames(nsBlockReflowState&, nsLineList_iterator, int*), XUL
- 19.6%, IsFrameAfter(nsIFrame*, nsIFrame*), XUL
- 0.7%, PR_GetCurrentThread, libnspr4.dylib
- 0.7%, PR_GetThreadPrivate, libnspr4.dylib

snip, 0%-ish stuff below
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 2

8 years ago
Created attachment 444841 [details]
report

Actually I will not attach the shark file. Its larger than 2MB which bugzilla seems to dislike. Lame.

Updated

8 years ago
Attachment #444841 - Attachment is patch: false

Updated

8 years ago
Assignee: general → nobody
Severity: critical → normal
Component: JavaScript Engine → Layout
OS: Windows Vista → All
Priority: -- → P2
QA Contact: general → layout
Hardware: x86 → All

Updated

8 years ago
Summary: Hangs on javascript loop with 10,000 iterations (works with fewer iterations). → Hangs on rendering of a lot of img tags in a document
(Reporter)

Comment 3

8 years ago
OK, I'll look up 'canvas'. I think I've heard of it, years ago, but really
don't know much about it. 

Thanks.
(Reporter)

Comment 4

8 years ago
Checked the canvas element. Looks very cool, but it seems to have it's own bug, which limits its width. I need to fill a page that is over 4,000,000 pixels wide and canvas seems to switch off between 1,000 and 10,000 pixels wide.

I'll have to detect for Firefox and skip these images... And hope that this issue gets fixed in the future.

Thanks again.
(In reply to comment #1)
> (I can't find any nightly builds with symbols, what ever happened
> to those?).

Mac nightlies all have symbols.
This is basically bug 455690; the comments there explain what's going on here.

Reporter, if the linked-to testcase is an accurate representation of your markup, then simply setting the parent element of the images (the <body> in this case, but you may want to wrap them in a <div> for the purpose) to display:none to start with and then resetting the display in the onload handler should prevent the performance issue from popping up in Firefox.
Depends on: 455690
Created attachment 444871 [details]
Testcase, for posterity; needs images to actually work
You need to log in before you can comment on or make changes to this bug.