dotnet / dotnet/roslyn

Don't store line pragmas in release builds

Open
#85,614 0 comments 0 reactions 0 assignees View on GitHub
Area-Razor Area-Razor-Compiler
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

Some low hanging fruit for memory usage, the compiler currently produces and stores line pragma information as part of a `RazorCodeDocument`, but the information is only used in tests. Even just simply putting `#if DEBUG` around all of it would be a small, but easy, win.

Contributor guide

Open the contributing guide

Research direction

Locate RazorCodeDocument and its line pragma storage, then trace the tests that consume that information and compare Debug versus release builds. Done means release builds no longer retain the data while the relevant tests still pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
compilers
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.