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

Java Implementation Cleanup #150

Open
4 of 8 tasks
noelwelsh opened this issue Mar 13, 2024 · 3 comments
Open
4 of 8 tasks

Java Implementation Cleanup #150

noelwelsh opened this issue Mar 13, 2024 · 3 comments

Comments

@noelwelsh
Copy link
Contributor

noelwelsh commented Mar 13, 2024

The Java2D backend is a bit of a mess. Clean it up:

  • Clearly separate Swing components (which exist in the Java-centric world) from Doodle components (which are Scala / Cats Effect). E.g. currently Canvas mixes the two.
  • Cleanly separate threading models. The current implementation mixes Cats Effect and Java threading and I think this is leading to deadlock. Make the boundaries between the two very clear and implent this correctly.
  • Follow Swing threading model, as described in Concurrency in Swing, for Swing components.
  • Make Java2DPanel (or equivalent, if it is replaced) embeddable in other Swing components.
  • Probably get rid of Reified and replace with the Church encoding, which I think will offer more opportunity for the JIT compiler to get to work, and will be easier to work with.
  • Look at dropped mouse clicks and attempt to fix
  • Optimize BlockingCircularQueue for reads over writes and SPSC use case (which might address dropped mouse clicks)
  • (Optional) Frame configuration to not embed the Canvas in a window, but keep it as an embeddable Swing component that can be used in a larger context.
@Shehrozkashif
Copy link

Hi Iam ineterested to solve this issue please explain it more

@noelwelsh
Copy link
Contributor Author

It's not a good first issue. (Those that are good first issues are labelled as such.) To undertake this you have to have a good understanding of Scala style and how the Java2D implementation works.

@Shehrozkashif
Copy link

so please assign me a good first issue

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

No branches or pull requests

2 participants