From fa04f7514e3ad6963385ab5df0d85031fb500794 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Sat, 11 May 2024 10:10:13 +0200 Subject: [PATCH] chore: Improve dev build startup time (#11692) RustEmbed repeatedly compiled regexes for handling of 'include='/'exclude' statements in a hot loop, which caused each call to Assets::iter() to take 600ms. Since it is being called twice on our startup path, that alone contributed over a second to startup time in debug builds. I've filed a PR with them https://github.com/pyrossh/rust-embed/pull/244 which brings down the time for a single iter() call to 6ms. Release Notes: - N/A --- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- crates/languages/Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a126718bea..90121acbf8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8387,9 +8387,9 @@ dependencies = [ [[package]] name = "rust-embed" -version = "8.2.0" +version = "8.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82c0bbc10308ed323529fd3c1dce8badda635aa319a5ff0e6466f33b8101e3f" +checksum = "19549741604902eb99a7ed0ee177a0663ee1eda51a29f71401f166e47e77806a" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -8398,9 +8398,9 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "8.2.0" +version = "8.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6227c01b1783cdfee1bcf844eb44594cd16ec71c35305bf1c9fb5aade2735e16" +checksum = "cb9f96e283ec64401f30d3df8ee2aaeb2561f34c824381efa24a35f79bf40ee4" dependencies = [ "proc-macro2", "quote", @@ -8411,9 +8411,9 @@ dependencies = [ [[package]] name = "rust-embed-utils" -version = "8.2.0" +version = "8.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cb0a25bfbb2d4b4402179c2cf030387d9990857ce08a32592c6238db9fa8665" +checksum = "38c74a686185620830701348de757fd36bef4aa9680fd23c49fc539ddcc1af32" dependencies = [ "globset", "sha2 0.10.7", diff --git a/Cargo.toml b/Cargo.toml index b011e35254..9ca5beb6cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -316,7 +316,7 @@ refineable = { path = "./crates/refineable" } regex = "1.5" repair_json = "0.1.0" rusqlite = { version = "0.29.0", features = ["blob", "array", "modern_sqlite"] } -rust-embed = { version = "8.0", features = ["include-exclude"] } +rust-embed = { version = "8.4", features = ["include-exclude"] } schemars = "0.8" semver = "1.0" serde = { version = "1.0", features = ["derive", "rc"] } diff --git a/crates/languages/Cargo.toml b/crates/languages/Cargo.toml index ff0f2de19b..1661586c99 100644 --- a/crates/languages/Cargo.toml +++ b/crates/languages/Cargo.toml @@ -26,7 +26,7 @@ node_runtime.workspace = true project.workspace = true regex.workspace = true rope.workspace = true -rust-embed = "8.2.0" +rust-embed.workspace = true serde.workspace = true serde_json.workspace = true settings.workspace = true