Closed Bug 78300 Opened 24 years ago Closed 13 years ago

Make imglib process data on a separate thread

Categories

(Core :: Graphics: ImageLib, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 716140

People

(Reporter: cathleennscp, Unassigned)

References

Details

(Keywords: perf, topembed-, Whiteboard: [adt3])

Attachments

(4 files)

Blocks: 71668
accepting.. posting patch
Status: NEW → ASSIGNED
Keywords: patch, perf
OS: other → All
Priority: -- → P3
Summary: make img lib thread safe → Make imglib thread safe
Target Milestone: --- → mozilla0.9.1
Depends on: 78611
there are a few "issues" with this patch: 1. it sends async events way too often when it should be sending sync events. 2. we should probably just do an async proxy of GetInputStream on chrome:// and file:// urls and read the whole buffer at once. 3. http isn't going to be threadsafe for 0.9.1, so we can't call AsyncOpen on a thread other than the UI thread (at least not for http:// urls). We need to call AsyncOpen on the UI thread and proxy onstart/onstop/ondataavailable calls from http on the UI thread to the imglib thread. 4. we really want the image container created on the UI thread... but I'd like to do this without the decoder needing to know anything about what thread it is running on.. this should be possible, since decoders are quite isolated, but will require a little bit of thought.
so what does it do you might ask? it loads all the chrome images... http images will load after about 30 asserts.
On unix, this will require me to remove the use of gtk_timeout_* in the code and fire plevents on the current thread's event queue. This should be fairly straight forward. don't know about mac or windows yet... I expect I will have to do something similar.
er, previous comments were meant for bug 78611
Depends on: 78849
Depends on: 78852
Summary: Make imglib thread safe → Make imglib process data on a seperate thread
Keywords: nsbeta1+
Attached patch newer patchSplinter Review
the last patch is missing some changes.. new one coming
Attached patch newest patchSplinter Review
moving to 0.9.2.
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Attached patch latest patchSplinter Review
shipping off to mozilla 1.0. this is kinda pointless to land until http is threadsafe.
Target Milestone: mozilla0.9.2 → mozilla1.0
Target Milestone: mozilla1.0 → mozilla0.9.8
Target Milestone: mozilla0.9.8 → mozilla1.0
Stuart: so this depends on bug 59434 being fixed?
Depends on: 59434
Target Milestone: mozilla1.0 → mozilla1.1
yes, very much depends on 59434
Blocks: 158715
Keywords: topembed
Topembed- as this is not currently needed by a major embedding customer.
Keywords: topembedtopembed-
Whiteboard: [adt3]
Summary: Make imglib process data on a seperate thread → [RFE]Make imglib process data on a seperate thread
Summary: [RFE]Make imglib process data on a seperate thread → [RFE]Make imglib process data on a separate thread
Severity: normal → enhancement
Summary: [RFE]Make imglib process data on a separate thread → Make imglib process data on a separate thread
Assignee: pavlov → nobody
Status: ASSIGNED → NEW
QA Contact: tpreston → imagelib
Target Milestone: mozilla1.1alpha → Future
Priority: P3 → --
Target Milestone: Future → ---
After testing the impact image decoding has on page load times, I believe that such a patch would not result in any significant gains. I ran some performance tests to try to determine the possible speed-ups that could be gained from implementing thread decoding. I ran the Talos tp tests that Tinderbox uses on Windows XP on two release builds of the trunk, one normal and one with all the image decoders disabled. Of course this kind of test isn't very accurate, but it is close enough for a rough estimate. The time difference between the two was, on each test, anywhere from 1 to 4 percent. I'm not sure that such a small gain justifies the complexity of a patch, which would probably have a comparable (or more likely smaller) time savings. Besides, the overhead that comes from threading would probably nullify most of the gains and perhaps make it slower than before. I would suggest marking this WONTFIX.
No code activity here since 2002, last reply in 2008 (comment 18) suggests WONTFIX, no reply since. ==> actually marking WONTFIX now.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
Actually, jeff is talking about doing this. CCing
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Doing this over in bug 716140 now.
Status: REOPENED → RESOLVED
Closed: 14 years ago13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: