Skip to content

Conversation

lucacasonato
Copy link
Member

Deno internally uses a bunch of different emit configurations, particularly regarding source maps.

The gen cache was layed out to support only one emit for a given source at a time. If two systems were trying to transpile the same source file in different ways, for example deno run and @deno/loader, the gen output for that file would keep thrashing, making everything slower.

This commit fixes this by including the transpile_and_emit_options_hash in the gen folder name. Additionally, we move from $DENO_DIR/gen to $DENO_DIR/gen_v2.

Deno internally uses a bunch of different emit configurations, particularly regarding source maps.

The gen cache was layed out to support only one emit for a given source at a time. If two systems were trying to transpile the same source file in different ways, for example `deno run` and `@deno/loader`, the gen output for that file would keep thrashing, making everything slower.

This commit fixes this by including the `transpile_and_emit_options_hash` in the gen folder name. Additionally, we move from `$DENO_DIR/gen` to `$DENO_DIR/gen_v2`.
Copy link
Member Author

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

David and I called about this. Instead of including the transpile options hash in the path, include a name, like bundle, compile, run, or js-loader. That way we don't have runaway growth of the gen folder.

@dsherret
Copy link
Member

Maybe we could continue to use the existing root folder for run, then add subfolders for the others.

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

Successfully merging this pull request may close these issues.

2 participants