Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn
Tim Webb
Vice President of Operations and a passionate technologist who thrives on merging software and marketing. Follow @timrwebb for periodic musing. A developer by birth, an optimizer by necessity, a forever believer in the ability of software to improve what you do.
Posted on Aug 23rd 2019
The CodeMix 2019.8.21 release included a major update on the performance and CPU utilization during development. As reported previously, we have been working through some lingering CPU consumption impacting a subset of our users. We are happy to report strong improvements in this release.

CPU Consumption

There are several areas we have identified and addressed that could result in high CPU consumption. The TypeScript language server version we were using was 3.4.3, which depending on project contents could cause a significant slowdown. The language server has been upgraded to 3.5.3 with the latest support. When the language server started to slow down, this could trigger a domino effect due to a backlog of outline requests as explained below.

When using the breadcrumb bar in the editor or outline view, as you are developing, CodeMix delays requests to the language server to update the outline view. It turns out that there was a timing window whereby if the language server was taking too long to respond, a second request could get queued up to run right after the first. If you were doing a lot of development and your language server was slow, this could cause a large backlog to be built up causing extended CPU usage even when idle.

Working with large HTML or XML files, we were shipping an extension that allowed the automatic renaming of tags as you are working. This Code extension has not been maintained over time. While it can provide a cool experience in some cases, it is not optimized for particular file structures resulting in extremely high CPU usage. We have removed this extension from distribution, though if you had CodeMix previously installed, you can turn it back by checking the Auto Rename Tag extension on the CodeMix Extension Manager.

What’s Next

The final area of investigation which is still ongoing is around PHP language intelligence. There are two different PHP extensions for Code that provide language smarts, and there seems to be value to switching to a newer version that uses less CPU with high-quality results. We’ll continue this investigation for an upcoming extensions pack update.
There is a lot more in this 2019.8.21 release of CodeMix including a totally reworked Syntax Coloring model which provides much more control over individual languages and associated constructs as well as new Formatting support which adds formatting of more languages as well as better transparency and control over how it works.

Take a moment to check out the full release and if you’re not already on the latest CodeMix, download it now to take advantage of all it has to offer!