Bug 266817 - Shared Object API implementation creates too many threads
Summary: Shared Object API implementation creates too many threads
Status: NEW
Alias: None
Product: ECF
Classification: RT
Component: ecf.core (show other bugs)
Version: 3.0.0   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: ecf.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-03 04:15 EST by Florian Hackenberger CLA
Modified: 2014-02-14 16:40 EST (History)
2 users (show)

See Also:


Attachments
A proof-of-concept implementation using the equinox utils thread pool (15.40 KB, patch)
2009-03-03 04:15 EST, Florian Hackenberger CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Hackenberger CLA 2009-03-03 04:15:32 EST
Created attachment 127289 [details]
A proof-of-concept implementation using the equinox utils thread pool

Build ID: M20080911-1700

Steps To Reproduce:
1. Create a ISharedObjectContainer
2. Add 50 shared objects
3. Observe that ECF creates > 50 threads


More information:
ECF should use a thread pool for processing shared object events.
Comment 1 Florian Hackenberger CLA 2009-03-03 04:16:21 EST
Concerning the patch:
Please note that I had to use the org.eclipse.equinox.util bundle from eclipse CVS:
dev.eclipse.org/cvsroot/rt 
org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.util

the same bundle from the ganymede update site did not work. The org.eclipse.ecf.provider bundle I patched is from 2009-01-14 (I can't tell the exact revision because I imported it into my svn, but I think I got it from the eclipse cvs). Everything else is from eclipse ganymede.
Comment 2 Remy Suen CLA 2009-04-27 14:15:56 EDT
Bug 273900 may be of interest.
Comment 3 Scott Lewis CLA 2009-04-27 14:56:04 EDT
(In reply to comment #2)
> Bug 273900 may be of interest.
> 

FWIW:  Florian has been working on changes in the org.eclipse.ecf.provider.generic package (in org.eclipse.ecf.provider plugin) that uses a thread pool to reduce thread usage.  Currently, Florian is working on moving the thread pool code down to run on CDC 1.1/Foundation 1.1 (which is the EE for org.eclipse.ecf.provider currently...and it would be good to keep it this way).

If we can get Florian's changes in place quickly enough, I would like to get this work into Galileo, because it does provide much better scaling.  Florian, do you want/need any further assistance here?



Comment 4 Florian Hackenberger CLA 2009-04-30 03:58:59 EDT
Sorry for the delay. I tried to download the WEME JVM from the link mentioned at http://wiki.eclipse.org/J9 but the download is not available anymore. That JVM seems to be a dead project, as it is not mentioned on the Websphere product page http://www.ibm.com/developerworks/websphere/products/

From looking at the patch, it seems that the ConcurrentLinkedQueue can be replaced with a simple queue without introducing any race conditions, because the code synchronizes on runnablesInQueue annyway. Are there any other incompatibilities?
Comment 5 Scott Lewis CLA 2014-02-14 16:40:14 EST
Moving to enhancement.  could easily use Equinox thread pool...or jobs...or custom thread pool instead.