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

refactor: Replace Queue with @datastructures-js #891

Merged
merged 1 commit into from Feb 15, 2022
Merged

refactor: Replace Queue with @datastructures-js #891

merged 1 commit into from Feb 15, 2022

Conversation

samestep
Copy link
Collaborator

@samestep samestep commented Feb 15, 2022

Description

#796 added a custom class Queue to utils/Util. This PR deletes it in favor of @datastructures-js/queue, yielding two advantages:

  • we don't need to maintain a queue implementation
  • performance is increased by using an array instead of a linked list

This has a precedent in that we already use @datastructures-js/heap:

"@datastructures-js/heap": "^3.2.0",

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new ESLint warnings
  • I have reviewed any generated changes to the diagrams/ folder

@cloudflare-pages
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8bd8b44
Status: ✅  Deploy successful!
Preview URL: https://1e981342.penrose-panes.pages.dev

View logs

@codecov
Copy link

codecov bot commented Feb 15, 2022

Codecov Report

Merging #891 (8bd8b44) into main (ad7c57a) will decrease coverage by 0.11%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #891      +/-   ##
==========================================
- Coverage   67.51%   67.39%   -0.12%     
==========================================
  Files          62       62              
  Lines        8206     8164      -42     
  Branches     1774     1768       -6     
==========================================
- Hits         5540     5502      -38     
+ Misses       2659     2655       -4     
  Partials        7        7              
Impacted Files Coverage Δ
packages/core/src/utils/Util.ts 59.48% <ø> (-4.89%) ⬇️
packages/core/src/engine/Autodiff.ts 74.67% <100.00%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ad7c57a...8bd8b44. Read the comment docs.

@samestep samestep merged commit 6b324e4 into main Feb 15, 2022
@samestep samestep deleted the queue branch February 15, 2022 19:54
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

Successfully merging this pull request may close these issues.

None yet

1 participant