Skip to content

ArrSorting sending more than one chunk to repaint() in publish() #23

Closed
@dlarocque

Description

@dlarocque

Since some systems are able to run the program faster than others, the program will send more than one chunk to publish(List<Integer[]> chunk), and causing the program to fall behind in frames drawn, making the red and blue bars that draw the swapped indexes out of sync with the sorting visualization.

Simply putting a very long sleep time makes the larger sorting arrays very slow to sort, and doesn't entirely fix the issue.

Need to find a way to either make the Sleep() method sleep an amount of time based on the system, or make the publish() method able to draw all the chunks to it, no matter how many there are.
Fixing this could open up the possibility of adding a slider for changing sorting speed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions