Every recompile takes 50 seconds. Even cargo's incremental build look like work. #577

Closed
opened 2026-02-04 21:38:13 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @insub on GitHub (Jan 27, 2020).

Subject of the issue

Every recompile takes 50 seconds (cargo build --features sqlite) , so every time I change the code, even if it's only one file, I have to wait 50s to preview it, Is it normal to consume this time?
BTW, the cargo's incremental build look like work.
Is there a better(fast) development way? (i'm a javascript coder, i don't have compiled language work experience)

Your environment

MacOS, 10.15.3

  • Bitwarden_rs version:
    v1.13.1

Steps to reproduce

cargo build --features sqlite
......
Finished dev [unoptimized + debuginfo] target(s) in 53.89s

Originally created by @insub on GitHub (Jan 27, 2020). ### Subject of the issue Every recompile takes 50 seconds (cargo build --features sqlite) , so every time I change the code, even if it's only one file, I have to wait 50s to preview it, Is it normal to consume this time? BTW, the cargo's incremental build look like work. Is there a better(fast) development way? (i'm a javascript coder, i don't have compiled language work experience) ### Your environment MacOS, 10.15.3 * Bitwarden_rs version: v1.13.1 ### Steps to reproduce cargo build --features sqlite ...... Finished dev [unoptimized + debuginfo] target(s) in 53.89s
Author
Owner

@dani-garcia commented on GitHub (Jan 28, 2020):

Yes, building rust code is slow. If you only want to check if the code compiles and not actually run it, you can use cargo check --features sqlite, which should be considerably faster.

@dani-garcia commented on GitHub (Jan 28, 2020): Yes, building rust code is slow. If you only want to check if the code compiles and not actually run it, you can use `cargo check --features sqlite`, which should be considerably faster.
Author
Owner

@insub commented on GitHub (Jan 28, 2020):

Does this mean that if I modify a api or view, I have to wait 50 seconds before actually preview it on the browser? (cargo run --features sqlite)

After I modify the code, I hope to preview it on the client. Is there any way to make code changes work faster?

@insub commented on GitHub (Jan 28, 2020): Does this mean that if I modify a api or view, I have to wait 50 seconds before actually preview it on the browser? (cargo run --features sqlite) After I modify the code, I hope to preview it on the client. Is there any way to make code changes work faster?
Author
Owner

@dani-garcia commented on GitHub (Jan 28, 2020):

If you modify the API, yes you'd have to wait and there's no faster way.

If you change the HTML templates, you can enable the following options:

TEMPLATES_FOLDER=src/static/templates
RELOAD_TEMPLATES=true

and with that any changes to the templates are applied immediately (for emails they apply to the next ones sent, for the admin page, after a page reload).

@dani-garcia commented on GitHub (Jan 28, 2020): If you modify the API, yes you'd have to wait and there's no faster way. If you change the HTML templates, you can enable the following options: ``` TEMPLATES_FOLDER=src/static/templates RELOAD_TEMPLATES=true ``` and with that any changes to the templates are applied immediately (for emails they apply to the next ones sent, for the admin page, after a page reload).
Author
Owner

@insub commented on GitHub (Jan 29, 2020):

@dani-garcia ok, thk!

@insub commented on GitHub (Jan 29, 2020): @dani-garcia ok, thk!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#577