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

Performance rewrite, i.e. nflseedR 2.0 #39

Merged
merged 48 commits into from
Aug 7, 2023
Merged

Performance rewrite, i.e. nflseedR 2.0 #39

merged 48 commits into from
Aug 7, 2023

Conversation

mrcaseb
Copy link
Member

@mrcaseb mrcaseb commented Dec 15, 2022

This is going to be a huge PR where I adjust a ton of stuff for efficiency by either using data.table or just redo some principles.

This is work in progress, needs serious checking, and shouldn't be merged until off season

It would probably be the best to rewrite every dplyr pipe in data.table to be able to drop dplyr but it is a ton of code and rewriting everything is a source for bugs.

So we might keep it hybrid data.table/dplyr. It is still significantly faster now

This branch is based off #36 and therefore holds some commits of that branch.

Tests will fail because some output data have data.table attributes now. fixed

I think it's better to update the tests with snapshots anyways

this is a big speed bump because dplyr bind_rows is slow at binding lists and data.table is a reverse dependency anyways
we need data.table for quick list binding and can use it to replace csv download with readr
and games data attributes modification for consistency
and save h2h in pkg environment
h2h has a new structure and is now only holding games that are listed in double games
mrcaseb and others added 18 commits December 15, 2022 18:30
looks for problems only if .debug = TRUE
allocates the problem vector for more speed
uses cli to output problems
needs some adjustments for data.table output
Merge remote-tracking branch 'origin' into dt-rewrite

# Conflicts:
#	DESCRIPTION
#	NAMESPACE
#	NEWS.md
#	R/compute_conference_seeds.R
#	R/compute_division_ranks.R
#	R/compute_draft_order.R
#	R/nflseedR-package.R
#	R/utils.R
#	tests/testthat/test-ranks_seeds_draftorder.R
Merge branch 'dt-rewrite' of https://github.com/nflverse/nflseedR into dt-rewrite

# Conflicts:
#	NAMESPACE
#	R/compute_conference_seeds.R
@mrcaseb mrcaseb changed the base branch from master to v2 August 7, 2023 15:00
@mrcaseb mrcaseb marked this pull request as ready for review August 7, 2023 15:00
@mrcaseb mrcaseb merged commit b249dbd into v2 Aug 7, 2023
6 checks passed
@mrcaseb mrcaseb deleted the dt-rewrite branch August 7, 2023 15:01
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.

1 participant