Repository navigation
Slight performance improvements to Source Positions recipe - #2821
Conversation
There was a problem hiding this comment.
This looks like it would result in nothing being added to the buffer. Have you tested that this change works as intended?
There was a problem hiding this comment.
This subclass of PrintOutputCapture doesn't really care about proper printing. Content of the out StringBuilder is of no importance as far as I remember. The PositionPrintOutputCapture is only to track current offset, line and column of an AST node. I have sanity tested this stuff manually. Markers in the IDE show up and locations seem correct. However, I have just noticed that UpdateSourcePositionsTest is disabled. Perhaps, I'll see if can be enabled again.
15985ae to
5109f39
Compare
|
@sambsnyd I have enabled the unit tests for positions recipe. I understand why it got disabled. Every time parsing of the white space changes or a new node introduce these tests start to fail. I've tried to simplify the tests in hope for them to be less annoying in the future: only test positions of identifier nodes. |
|
Thanks @BoykoAlex , appreciate that you got the test working as well |
Light performance improvements: ~15%
Was thinking about
includeMarkersbooleanoption. Iffalsewon't attempt to visitMarkersconsequently no positions assigned to markers. Yields another 10%. However, compared to overall running time of the recipe felt like it is not worth it.