Skip to content

Commit

Permalink
Revert "perf: reduce Module size (#6)" (#7)
Browse files Browse the repository at this point in the history
This reverts commit b1ceb65.
  • Loading branch information
hyf0 authored Sep 19, 2023
1 parent b1ceb65 commit 711ddb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/rolldown/src/bundler/module/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use super::{external_module::ExternalModule, render::RenderModuleContext, Normal

#[derive(Debug)]
pub enum Module {
Normal(Box<NormalModule>),
External(Box<ExternalModule>),
Normal(NormalModule),
External(ExternalModule),
}

impl Module {
Expand Down
4 changes: 2 additions & 2 deletions crates/rolldown/src/bundler/module_loader/module_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl<'a> ModuleLoader<'a> {
while tables.len() <= task_result.module_id.raw() as usize {
tables.push(Default::default());
}
intermediate_modules[module_id] = Some(Module::Normal(Box::new(builder.build())));
intermediate_modules[module_id] = Some(Module::Normal(builder.build()));

tables[task_result.module_id] = symbol_table
}
Expand Down Expand Up @@ -151,7 +151,7 @@ impl<'a> ModuleLoader<'a> {
id,
ResourceId::new(info.path.clone(), &self.input_options.cwd),
);
intermediate_modules[id] = Some(Module::External(Box::new(ext)));
intermediate_modules[id] = Some(Module::External(ext));
} else {
not_visited.insert(id);

Expand Down

0 comments on commit 711ddb0

Please sign in to comment.