Closed miyaji255 closed 7 months ago
The more external URLs you register in markdown.marp.themes
, the slower it will run.
Since Marp uses the Markdown preview mechanism provided by VS Code, we are skeptical whether this issue is specific to Marp. Please verify if the CPU usage problem is indeed caused by the Marp for VS Code extension.
For instance, there might be other extensions or non-extension processes in VS Code that could be consuming CPU resources. If you disable all extensions except Marp, does the issue still occur?
Furthermore, please check if the CPU usage increases in the default Markdown preview of VS Code.
If it is surely confirmed that the Marp extension is the cause, please share the CPU profiles during the moments when the CPU usage is high. https://github.com/microsoft/vscode/wiki/Performance-Issues#profiling-the-shared-process
I am unable to save a Performance Profile due to a bug in Chromium.
https://github.com/electron/electron/issues/39818 https://github.com/microsoft/vscode/issues/200668
This is a screenshot of the Performance Profile.
After disabling each of the extensions, we found that it occurs when Markdown All in One and Marp are enabled at the same time.
CPU usage did not increase when editing non-Marp Markdown files with Markdown All in One enabled.
The documentation of Markdown All in One extension seems to have mentioned about the incompatibility with Marp for VS Code. https://markdown-all-in-one.github.io/docs/guide/compatibility.html#incompatibility
According to the documentation, that is especially concerned about the outline extension by Marp (microsoft/vscode#132741). You might mitigate compatibillity problem to disable Marp's outline extension markdown.marp.outlineExtension
.
FYI I have been using the two extensions at the same time for a long time, and I have not experienced any clear problems about compatibillity.
Thank you for your research. Disabling the markdown.marp.outlineExtension
did not change the problem, it only occurs when I write HTML tags, so I will disabling Markdown All in One when I write HTML to create slides.
Close for housekeeping, because still cannot determine whether this problem is caused by Marp for VS Code. That may still dependent on HTML contents by the user.
Version of Marp Tool
Marp for VS Code v2.8.0
Operating System
Windows
Environment
How to reproduce
This is especially noticeable when
markdown.marp.enableHtml
istrue
.Expected behavior
CPU utilization is within the sensible range.
Actual behavior
On notebooks and other less powerful computers, CPU utilization rises to about 50%.
Additional information
I assume that even after the code change, the conversion from the previous change has not been canceled.