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

Sorting network visualizer rewrite #74

Merged
merged 23 commits into from
Dec 28, 2021
Merged

Sorting network visualizer rewrite #74

merged 23 commits into from
Dec 28, 2021

Conversation

Gaming32
Copy link
Owner

@Gaming32 Gaming32 commented Dec 1, 2021

This PR rewrites the sorting network visualizer from the ground up, in pure Java. This removes the dependency on Python, and makes visualization much faster (because Java is faster than Python).

Remove String.format usage
There appears to be a memory leak somewhere, but I can't find it.
Some sizing data is messed up, causing the browser to think the image is much bigger than it actually is.
@Gaming32 Gaming32 added the enhancement New feature or request label Dec 1, 2021
@Gaming32 Gaming32 requested a review from EmeraldBlock December 1, 2021 17:45
Copy link
Collaborator

@EmeraldBlock EmeraldBlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignored whitespace changes, didn't look much at implementation specifics.

wonder if code duplication could be avoided in the sorting network svg generator algorithm, but don't wanna figure out how it works lol

Copy link
Collaborator

@EmeraldBlock EmeraldBlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, I figured out how the svg algorithm works.

perhaps the "grouping" ("groups" are the sets of compswaps close to each other and vertically overlapping) part could be re-implemented for a performance boost (it's like O(n^2) for each group of size n) and to horizontally compact the groups. It reminds me of a familiar coding problem... but that'd be for after this PR lol

@Gaming32
Copy link
Owner Author

So are we all ready to merge then?

Copy link
Collaborator

@EmeraldBlock EmeraldBlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review on the new commits

@Gaming32
Copy link
Owner Author

Are we finally ready then?

@EmeraldBlock EmeraldBlock self-requested a review December 28, 2021 19:44
Copy link
Collaborator

@EmeraldBlock EmeraldBlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good:tm:

@Gaming32 Gaming32 merged commit b477f08 into main Dec 28, 2021
@Gaming32 Gaming32 deleted the java-sorting-network branch December 28, 2021 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request improved-feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants