Syntax highlighting makes internal editor less responsive
Draws signalling charts, block diagrams and graphs from text input.
Brought to you by:
teknos293
For some time I observed that while working on longer flows, performance degrades in the internal editor. Today I tried to narrow it down to a reproducible case and found the following:
Kind regards,
Vincent de Lau
title: Some titel\n split over two lines; NODE1, # Internal description of node 1. NODE2, # Internal description of node 2. NODE3, # Internal description of node 3. NODE4; # Internal description of node 4. ..: Scenario 1: Description of Scenario { NODE1 <-> NODE4: Adding new content here takes\n more than 1 second per keystroke; NODE1 -> NODE2: Message 1; NODE2 -> NODE3: Message 2; NODE3 <-> NODE4: Transaction 1; NODE3 -> NODE2: Message 3; NODE2 -> NODE4: Message 4; NODE4 -> NODE2 -> NODE1: Message 5; NODE4 <=> NODE2 <=> NODE1: Continuation; }; ..: Scenario 2: Description of Scenario { NODE1 -> NODE2: Message 1; NODE2 -> NODE3: Message 2; NODE3 -> NODE2: Message 3; NODE2 -> NODE4: Message 4; NODE4 -> NODE2 -> NODE1: Message 5; NODE4 <=> NODE2 <=> NODE1: Continuation; }; ..: Scenario 3: Description of Scenario { NODE1 -> NODE2: Message 1; NODE2 -> NODE3: Message 2; NODE3 <-> NODE4: Transaction 1; NODE3 -> NODE2: Message 3; NODE2 -> NODE4: Message 4; NODE4 -> NODE2 -> NODE1: Message 5; NODE4 <=> NODE2 <=> NODE1: Continuation; }; ..: Scenario 4: Description of Scenario { NODE1 -> NODE2: Message 1; NODE2 -> NODE3: Message 2; NODE3 -> NODE2: Message 3; NODE2 -> NODE4: Message 4; NODE4 -> NODE2 -> NODE1: Message 5; NODE4 <=> NODE2 <=> NODE1: Continuation; NODE1 <-> NODE4: Adding new content here is reasonably responsive; };
Hi Vincent,
Thanks for the thorough bug report.
I could not, however, reconstruct the problem. With the chart above I experience nothing close to the one second you describe.
Syntax highlighting is otherwise an expensive operation. It is designed to be rich rather than fast, but over the years I put in many optimizations, and works reasonably well on my machine up to charts of 30K in size. Its time should not much differ between the top and bottom of the file unless large parts of the text changes color.
What kind of CPU do you have? Which version of Msc-generator do you use?
Due to lack of response. I close this ticket.
Sorry for the late reply. I was using 5.3.4 at the time, on a Lenovo Yoga with an Intel Core i7 4500, 8GB RAM, SSD and Windows 8.1 Pro.
Just installed 5.3.6 and the problem has gone away.
Last edit: Vincent de Lau 2016-10-04