Closed Bug 19170 Opened 25 years ago Closed 25 years ago

Need to yield to necko thread more often

Categories

(Core :: Networking, defect, P3)

PowerPC
Mac System 8.5
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: sfraser_bugs, Assigned: sfraser_bugs)

Details

There are performance problems now (e.g. image rendering 18738) which result from
us not yielding to the necko thread often enough. We need to yield every time
through the main event loop.
Patch for this (line numbers omitted, because I have other changes)

  		DoIdle(*anEvent);
  		if (mRunning)
  			Repeater::DoIdlers(*anEvent);
+
+ 		// yield to other threads
+ 		PR_Sleep(PR_INTERVAL_NO_WAIT);
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fix checked in.
This change should make rendering of large image snappier. It should also help
other stuff that runs on threads, like IMAP.
this smells like something that may be hurting unix too.

adding mscott, pavlov and alecf to the cc list.

anyone have ideas how to do this on unix, too?

the fix was to
add me to the cc list too.
ok, I'm trying a similar fix for unix now...

cross your fingers, unix lovers!

Index: nsWidget.cpp
===================================================================
RCS file: /cvsroot/mozilla/widget/src/gtk/nsWidget.cpp,v
retrieving revision 1.168
diff -p -r1.168 nsWidget.cpp
*** nsWidget.cpp        1999/11/16 01:10:46     1.168
--- nsWidget.cpp        1999/11/18 06:22:22
*************** NS_IMETHODIMP nsWidget::DispatchEvent(ns
*** 1324,1329 ****
--- 1324,1332 ----
    }
    NS_RELEASE(aEvent->widget);

+   // yield to other threads
+   PR_Sleep(PR_INTERVAL_NO_WAIT);
+
    return NS_OK;
  }
Component: Browser-General → Necko
QA Contact: leger → tever
Setting QA contact for verification.
Bulk move of all Necko (to be deleted component) bugs to new Networking

component.
setting milestone and marking verified
Status: RESOLVED → VERIFIED
Target Milestone: --- → M12
You need to log in before you can comment on or make changes to this bug.