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

Reduce napi binary size #214

Open
Boshen opened this issue Jul 3, 2024 · 0 comments
Open

Reduce napi binary size #214

Boshen opened this issue Jul 3, 2024 · 0 comments

Comments

@Boshen
Copy link
Member

Boshen commented Jul 3, 2024

Cargo bloat:

File  .text    Size              Crate Name
 0.3%   0.7% 11.6KiB                std std::backtrace_rs::symbolize::gimli::Context::new
 0.2%   0.6%  9.3KiB                std addr2line::ResUnit<R>::find_function_or_location::{{closure}}
 0.2%   0.5%  8.5KiB                std std::backtrace_rs::symbolize::gimli::resolve
 0.2%   0.5%  8.2KiB               napi napi::bindgen_runtime::js_values::string::<impl napi::bindgen_runtime::js_values::FromNapiValue for alloc::...
 0.2%   0.5%  7.2KiB                std gimli::read::dwarf::Unit<R>::new
 0.2%   0.4%  6.8KiB                std addr2line::Lines::parse
 0.1%   0.3%  5.3KiB oxc_napi_resolver? <oxc_napi_resolver::options::NapiResolveOptions as napi::bindgen_runtime::js_values::FromNapiValue>::from_n...
 0.1%   0.3%  4.5KiB tracing_subscriber <tracing_subscriber::fmt::format::Format<tracing_subscriber::fmt::format::Full,T> as tracing_subscriber::fm...
 0.1%   0.3%  4.3KiB                std std::backtrace_rs::symbolize::gimli::macho::Object::parse
 0.1%   0.3%  4.2KiB       oxc_resolver oxc_resolver::ResolverGeneric<Fs>::resolve_tracing
 0.1%   0.3%  4.1KiB                std addr2line::function::Function<R>::parse_children
 0.1%   0.2%  3.9KiB                std gimli::read::unit::parse_attribute
 0.1%   0.2%  3.6KiB         rustc_hash rustc_hash::hash_bytes
 0.1%   0.2%  3.6KiB         rustc_hash rustc_hash::hash_bytes
 0.1%   0.2%  3.5KiB       oxc_resolver oxc_resolver::ResolverGeneric<Fs>::load_tsconfig::{{closure}}
 0.1%   0.2%  3.4KiB               napi napi::bindgen_runtime::module_register::napi_register_module_v1::{{closure}}::{{closure}}
 0.1%   0.2%  3.3KiB  oxc_napi_resolver oxc_napi_resolver::ResolverFactory::normalize_options
 0.1%   0.2%  3.3KiB         serde_json <&mut serde_json::de::Deserializer<R> as serde::de::Deserializer>::deserialize_any
 0.1%   0.2%  3.2KiB                ryu ryu::d2s::d2d
 0.1%   0.2%  3.2KiB       oxc_resolver <oxc_resolver::error::ResolveError as core::fmt::Display>::fmt

What's in the binary:

image

Ways to get rid of these, requiring nightly ...

Seems pretty complicated ...

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

No branches or pull requests

1 participant