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

Explore enabling `large-tables` and/or `huge-tables` by default #1241

Closed
sgrif opened this Issue Oct 6, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@sgrif
Member

sgrif commented Oct 6, 2017

I was looking at the compile times for our test suite with various table size features enabled, both when Diesel needed to be compiled, and when only the tests needed to be compiled. This was done on rustc 1.22.0-nightly (325ba23d5 2017-09-19), with incremental comp enabled.

# Baseline
> (cd diesel_tests && touch tests/lib.rs && cargo build --tests --features postgres)
   Compiling diesel v0.16.0 (file:///Users/sean/Documents/Projects/open-source/diesel/diesel)
   Compiling diesel_infer_schema v0.16.0 (file:///Users/sean/Documents/Projects/open-source/diesel/diesel_infer_schema)
   Compiling diesel_tests v0.1.0 (file:///Users/sean/Documents/Projects/open-source/diesel/diesel_tests)
   Compiling diesel_codegen v0.16.0 (file:///Users/sean/Documents/Projects/open-source/diesel/diesel_codegen)
    Finished dev [unoptimized + debuginfo] target(s) in 71.95 secs
>  (cd diesel_tests && touch tests/lib.rs && cargo build --tests --features postgres)
   Compiling diesel_tests v0.1.0 (file:///Users/sean/Documents/Projects/open-source/diesel/diesel_tests)
    Finished dev [unoptimized + debuginfo] target(s) in 24.19 secs

# `large-tables` turned on                                                                                                                                                                                       > (cd diesel_tests && touch tests/lib.rs && cargo build --tests --features postgres)
   Compiling diesel v0.16.0 (file:///Users/sean/Documents/Projects/open-source/diesel/diesel)
   Compiling diesel_infer_schema v0.16.0 (file:///Users/sean/Documents/Projects/open-source/diesel/diesel_infer_schema)
   Compiling diesel_tests v0.1.0 (file:///Users/sean/Documents/Projects/open-source/diesel/diesel_tests)
   Compiling diesel_codegen v0.16.0 (file:///Users/sean/Documents/Projects/open-source/diesel/diesel_codegen)
    Finished dev [unoptimized + debuginfo] target(s) in 77.74 secs
> (cd diesel_tests && touch tests/lib.rs && cargo build --tests --features postgres)
   Compiling diesel_tests v0.1.0 (file:///Users/sean/Documents/Projects/open-source/diesel/diesel_tests)
    Finished dev [unoptimized + debuginfo] target(s) in 25.0 secs

# `huge-tables` turned on
> (cd diesel_tests && touch tests/lib.rs && cargo build --tests --features postgres)
   Compiling diesel v0.16.0 (file:///Users/sean/Documents/Projects/open-source/diesel/diesel)
   Compiling diesel_infer_schema v0.16.0 (file:///Users/sean/Documents/Projects/open-source/diesel/diesel_infer_schema)
   Compiling diesel_tests v0.1.0 (file:///Users/sean/Documents/Projects/open-source/diesel/diesel_tests)
   Compiling diesel_codegen v0.16.0 (file:///Users/sean/Documents/Projects/open-source/diesel/diesel_codegen)
    Finished dev [unoptimized + debuginfo] target(s) in 147.86 secs
> (cd diesel_tests && touch tests/lib.rs && cargo build --tests --features postgres)
   Compiling diesel_tests v0.1.0 (file:///Users/sean/Documents/Projects/open-source/diesel/diesel_tests)
    Finished dev [unoptimized + debuginfo] target(s) in 24.12 secs

It looks like these features no longer have any effect on application compilation time, and the large-tables feature might have a small enough effect on the crate's compile time to be worth turning on by default. huge-tables still looks like it doubles our compilation time, but given that most users don't recompile Diesel often, maybe it's worth just enabling that by default, too. I want to explore this more on stable and without incremental comp.

@sgrif sgrif added this to the 1.2 milestone Jan 15, 2018

@sgrif

This comment has been minimized.

Member

sgrif commented Feb 3, 2018

@sgrif sgrif closed this Feb 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment