szabototo89 / CodeSharper

Refactoring tool, written in C# and using TDD for developing
2 stars 0 forks source link

[core] Add computed text ranges #44

Open szabototo89 opened 9 years ago

szabototo89 commented 9 years ago

Regular TextRanges are very expensive. In that cases where text ranges value can be predicted should use computed text ranges. For example:

{ "name": "John Doe" }
where "name" is the whole text range in KeyDeclaration

In the previous case we shouldn't create a new text range just for getting its "pure" value (name itself), but we know exactly that "name" is computed from name and two other quotes. It is easy to calculate.