Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
c5f23fdd
Unverified
Commit
c5f23fdd
authored
Nov 08, 2024
by
Tobias Koppers
Committed by
GitHub
Nov 08, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Turbopack] add TODO comment (#72510)
### What? Adds a TODO for a low hanging performance fruit
parent
92545d91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
mod.rs
turbopack/crates/turbopack-ecmascript/src/references/mod.rs
+6
-0
No files found.
turbopack/crates/turbopack-ecmascript/src/references/mod.rs
View file @
c5f23fdd
...
...
@@ -540,6 +540,12 @@ pub(crate) async fn analyse_ecmascript_module_internal(
}
}
}
// TODO This is too eagerly generating the source map. We should store a GenerateSourceMap
// instead and only actually generate the SourceMap when it's needed. This would allow to avoid
// generating the source map when a module is never included in the final bundle. It allows
// analysis to finish earlier which makes references available earlier which benefits
// parallelism. When SourceMaps are emitted it moves that generation work to the code generation
// phase which is more parallelizable.
let
mut
source_map_from_comment
=
false
;
if
let
Some
((
_
,
path
))
=
paths_by_pos
.into_iter
()
.max_by_key
(|
&
(
pos
,
_
)|
pos
)
{
let
origin_path
=
origin
.origin_path
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment