Community
Participate
Working Groups
I'm raising this defect as a placeholder for the regression that our new Scanner migration has created. Both our CModelElementsTest (Quick & Structural) have the body of checkLineNumbers() commented out. These tests fail regularily.
I haven't committed this fix yet, as it negatively affects performance. Attempt 1 (where we keep track of \n's throughout the scanner) yielded incorrect results. Attempt 2 (where we figure it out as we go without storing information) hurt our performance by an order of magnitude ... ~41 seconds to parse the trilogy. Attempt 3 (where we store some meta-data to help us take shortcuts in figuring out line numbers) yield 30% degradation over what is currently in 2.0.1 branch/HEAD. I'll keep plowing away at this with further optimizations. Since we do not need line numbers for content assist, I plan to short-circuit this code in COMPLETION_PARSE mode. The same can go for handleProblem() since Content Assist cares not for IProblem.
I've managed to find a solution which adds only a couple of milliseconds overhead to parsing the trilogy. Fix applied to HEAD and 2_0 branch.