1

Closed

Full reparse when typing C# code before markup

description

When typing a new C# statement inside a Razor block immediately before embedded markup, the parser immediately considers all text from the start of the new statement to the nearest ";" as code. This means embedded markup in this range will be reclassified as code, causing incorrect colorization

This also means a full reparse occurs, which can slow down typing performance.

Identified by WebMatrix Editor team. Created from WebMatrix Bug# 37123


Example:
div gets parsed as C#:
@{
int x <div></div>
}
div gets parsed as markup:
@{
int x; <div></div>
}
This might make sense for runtime, but when typing the div text will flash, and typing performance is affected.
Closed Apr 22 at 5:24 PM by yishaigalatzer
Closing as current typing performance is reasonable.

If new plans arise to work on parser perf, we will scrub the bugs to look into this.

See related issues 314 and 315

comments

yishaigalatzer wrote Apr 19 at 10:03 PM

Similar to 315 & 314