Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update library sites to use modern Java concurrency tools #192

Open
7 tasks
arthurp opened this issue Feb 18, 2017 · 1 comment
Open
7 tasks

Update library sites to use modern Java concurrency tools #192

arthurp opened this issue Feb 18, 2017 · 1 comment

Comments

@arthurp
Copy link
Member

arthurp commented Feb 18, 2017

Many of the Orc library sites are implemented using Java monitors. Since those sites were implemented Java has added a number of concurrency tools to it's own library (such as ConcurrentLinkedQueue). We could get a significant performance gain by reimplementing Orc library sites based on new Java library classes and using lower level tools that already existed (such as AtomicInteger).

This issue tracks a number of small changes. They are grouped since they will not take much time and they are all closely related. I figured this would be less noisy.

Sites that should to be considered for reimplemention:

  • Channel (could almost certainly be improved)
  • Counter (could almost certainly be improved)
  • Cell (can be eliminated entirely and implemented as an object)
  • SyncChannel
  • BoundedChannel
  • Semaphore
  • Ref

(This is basically the entire orc.lib.state package. But there may be other sites that could use a check. Anywhere that uses synchronized would be a good place to start.)

PS: This work may also get us close enough to removing all the old style Java sites that we could just kill them all and get ride of the shims.

@arthurp
Copy link
Member Author

arthurp commented Jul 23, 2017

Before starting on this we should verify that the performance of the sites is actually important and is overwhelming the overhead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant