Skip to content

Build time meta-issue #621

Closed
Closed

Description

@sophiajt

This is a meta-issue to track areas we could improve build times. If you'd like to help, let us know below.

Current crates under investigation for being replaced or removed to help improve build times:

  • clap
  • regex
  • nix

Full list below:

Analyzing target/debug/nu

 File  .text     Size   Time Crate
 5.0%  29.8%   5.9MiB 31.27s nu
 1.6%   9.4%   1.9MiB 10.25s clap
 1.4%   8.2%   1.6MiB      - [Unknown]
 0.7%   4.3% 864.4KiB      - std
 0.6%   3.7% 759.0KiB  6.36s regex_syntax
 0.6%   3.7% 750.2KiB  6.74s regex
 0.6%   3.7% 739.4KiB  4.34s http
 0.4%   2.7% 541.3KiB  3.58s isahc
 0.4%   2.4% 477.6KiB  2.99s toml
 0.4%   2.1% 428.1KiB  1.57s idna
 0.3%   2.0% 409.8KiB  2.65s aho_corasick
 0.3%   1.9% 388.5KiB  2.15s rustyline
 0.3%   1.6% 333.6KiB  2.11s yaml_rust
 0.3%   1.6% 331.3KiB  1.81s term
 0.3%   1.5% 305.4KiB  1.96s serde_hjson
 0.2%   1.5% 299.9KiB  1.66s c2_chacha
 0.2%   1.0% 193.6KiB  2.15s subprocess
 0.1%   0.9% 174.9KiB  1.45s glob
 0.1%   0.8% 164.6KiB  2.34s num_bigint
 0.1%   0.8% 161.8KiB  1.04s libgit2_sys
 0.1%   0.8% 159.4KiB  1.37s render_tree
 0.1%   0.7% 143.2KiB  1.18s roxmltree
 0.1%   0.7% 138.6KiB  0.90s curl_sys
 0.1%   0.7% 133.5KiB  1.70s serde_yaml
 0.1%   0.7% 133.4KiB  2.31s serde_json
 0.1%   0.6% 127.0KiB  1.50s url
 0.1%   0.6% 120.2KiB  1.60s chrono
 0.1%   0.6% 116.7KiB  0.97s xmlparser
 0.1%   0.5% 107.1KiB  1.25s prettytable
 0.1%   0.5%  99.6KiB  0.85s env_logger
 0.1%   0.5%  93.0KiB  0.32s rand_hc
 0.1%   0.4%  88.5KiB  1.64s bson
 0.1%   0.4%  79.5KiB  1.76s rusqlite
 0.1%   0.4%  78.1KiB  0.67s termcolor
 0.1%   0.3%  68.9KiB  0.57s csv_core
 0.0%   0.3%  56.8KiB  1.55s libsqlite3_sys
 0.0%   0.3%  56.2KiB  0.99s libnghttp2_sys
 0.0%   0.3%  54.0KiB  1.26s memchr
 0.0%   0.3%  53.9KiB  0.83s surf
 0.0%   0.3%  53.4KiB  0.50s num_cpus
 0.0%   0.3%  51.7KiB  0.74s strsim
 0.0%   0.2%  50.4KiB  0.82s xdg
 0.0%   0.2%  48.8KiB  0.49s textwrap
 0.0%   0.2%  47.5KiB  5.74s nix
 0.0%   0.2%  47.2KiB  1.31s bstr
 0.0%   0.2%  46.1KiB  1.92s rand
 0.0%   0.2%  44.2KiB  1.71s curl
 0.0%   0.2%  43.5KiB  0.32s sluice
 0.0%   0.2%  41.1KiB  0.81s bytes
 0.0%   0.2%  40.4KiB  5.11s git2
 0.0%   0.2%  38.8KiB  0.59s language_reporting
 0.0%   0.2%  37.0KiB  3.90s unicode_normalization
 0.0%   0.2%  33.9KiB  0.80s percent_encoding
 0.0%   0.2%  31.1KiB  0.40s thread_local
 0.0%   0.1%  30.3KiB  4.95s serde
 0.0%   0.1%  29.7KiB  1.05s csv
 0.0%   0.1%  29.7KiB  0.54s mime
 0.0%   0.1%  29.1KiB  0.53s tempfile
 0.0%   0.1%  28.4KiB  0.31s chrono_humanize
 0.0%   0.1%  27.6KiB  0.39s ansi_term
 0.0%   0.1%  26.7KiB  0.69s time
 0.0%   0.1%  26.4KiB  0.45s openssl_probe
 0.0%   0.1%  25.7KiB  1.36s unicode_bidi
 0.0%   0.1%  25.4KiB  0.28s rand_os
 0.0%   0.1%  25.4KiB  0.28s getrandom
 0.0%   0.1%  24.7KiB  0.92s log
 0.0%   0.1%  24.5KiB  0.54s dirs_sys
 0.0%   0.1%  22.2KiB  0.38s dirs
 0.0%   0.1%  19.7KiB  0.57s unicode_segmentation
 0.0%   0.1%  19.5KiB  0.43s base64
 0.0%   0.1%  19.4KiB  0.41s bigdecimal
 0.0%   0.1%  18.9KiB  0.30s futures_io
 0.0%   0.1%  18.3KiB  0.58s uuid
 0.0%   0.1%  18.2KiB  0.62s ryu
 0.0%   0.1%  18.1KiB  0.30s rand_jitter
 0.0%   0.1%  18.1KiB  0.29s which
 0.0%   0.1%  16.5KiB  0.94s futures_executor
 0.0%   0.1%  16.3KiB  0.32s rand_core
 0.0%   0.1%  15.3KiB  0.89s crossbeam_channel
 0.0%   0.1%  13.5KiB  0.39s humantime
 0.0%   0.1%  13.4KiB  0.31s app_dirs
 0.0%   0.1%  12.9KiB  1.42s unicase
 0.0%   0.1%  12.8KiB  0.23s dtoa
 0.0%   0.1%  12.4KiB  0.28s futures_core
 0.0%   0.1%  11.5KiB  0.31s serde_bytes
 0.0%   0.1%  10.8KiB  3.61s nom
 0.0%   0.0%   9.4KiB  0.13s itoa
 0.0%   0.0%   8.3KiB  2.56s futures
 0.0%   0.0%   6.9KiB  0.40s regex_automata
 0.0%   0.0%   6.8KiB  0.47s socket2
 0.0%   0.0%   6.4KiB  0.34s pretty_env_logger
 0.0%   0.0%   6.1KiB  3.06s futures_util
 0.0%   0.0%   5.7KiB  0.33s failure
 0.0%   0.0%   5.5KiB  0.15s iovec
 0.0%   0.0%   4.8KiB  0.23s futures_codec
 0.0%   0.0%   4.7KiB  1.06s byteorder
 0.0%   0.0%   4.7KiB  1.42s num_traits
 0.0%   0.0%   4.5KiB  0.59s serde_ini
 0.0%   0.0%   4.0KiB  1.12s decimal
 0.0%   0.0%   3.3KiB  0.40s rand_chacha
 0.0%   0.0%   3.2KiB  0.18s ctrlc
 0.0%   0.0%   3.2KiB  0.19s nom5_locate
 0.0%   0.0%   3.0KiB  1.29s encode_unicode
 0.0%   0.0%   2.7KiB  0.23s byte_unit
 0.0%   0.0%   2.2KiB  1.81s mime_guess
 0.0%   0.0%   1.9KiB  3.36s lexical_core
 0.0%   0.0%   1.9KiB  0.83s num_integer
 0.0%   0.0%   1.8KiB  4.22s rustc_serialize
 0.0%   0.0%   1.4KiB  0.09s unicode_xid
 0.0%   0.0%   1.2KiB  0.61s indexmap
 0.0%   0.0%   1.1KiB  1.22s hex
 0.0%   0.0%     853B  0.25s futures_channel
 0.0%   0.0%     347B  0.68s tokio_io
 0.0%   0.0%     280B  0.07s term_size
 0.0%   0.0%     272B  0.51s openssl_sys
 0.0%   0.0%     199B  0.29s rand_pcg
 0.0%   0.0%     138B  0.24s md5
 0.0%   0.0%     106B  0.85s ppv_lite86
 0.0%   0.0%     106B  0.05s atty
 0.0%   0.0%      36B  0.11s utf8parse
 0.0%   0.0%      27B  0.08s pretty_hex
 0.0%   0.0%      15B  0.06s void
 0.0%   0.0%      11B  0.42s smallvec
16.8% 100.0%  19.8MiB        .text section size, the file size is 117.9MiB

Activity

  1. DrSensor commented on Sep 9, 2019

    @DrSensor
    Contributor

    Hi, would you mind to share how to produce that logs?

  2. sophiajt commented on Sep 9, 2019

    @sophiajt
    ContributorAuthor

    Sure thing, this is what I ran:

    To install cargo-bloat:

    cargo install cargo-bloat
    

    Then, to run it:

    cargo bloat --bin nu --crates --time -j 1 -n 200
    
  3. wycats commented on Sep 9, 2019

    @wycats
    Contributor

    One thing that's fairly apparent to me is that there are some crates that are contributing a lot to incremental time (time to red lines in my editor) because of something like macro expansions or generics expansions.

    For example, when I watch the vscode bottom bar, heim takes a long time after ctrl-s, even when heim didn't change. I think these problems are very important because they affect incremental type checking.

  4. added
    status:investigate
    category:meta-issue
    deprecated:optimization
    on Sep 10, 2019
  5. sophiajt commented on Sep 13, 2019

    @sophiajt
    ContributorAuthor

    @androbtech - with your fix, should we check off regex?

  6. andrasio commented on Sep 21, 2019

    @andrasio
    Member

    @jonathandturner Direct dependency removed. However, there are some crates we depend on that also depend on it.

  7. github-actions commented on Jun 24, 2021

    @github-actions

    This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

  8. github-actions commented on Jul 7, 2021

    @github-actions

    This issue has been marked stale for more than 10 days without activity. Closing this issue, but if you find that the issue is still valid, please reopen.

  9. added a commit that references this issue on Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:meta-issuedeprecated:optimizationstatus:investigate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions