Extension causes high cpu load #756

Closed
opened 2026-10-05 03:04:00 +02:00 by adam · 6 comments
Owner
  • Issue Type: Performance
  • Extension Name: vscode-front-matter
  • Extension Version: 10.9.0
  • OS Version: Darwin arm64 25.0.0
  • VS Code version: 1.104.1

eliostruyf.vscode-front-matter-unresponsive.cpuprofile.txt

Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load

- Issue Type: `Performance` - Extension Name: `vscode-front-matter` - Extension Version: `10.9.0` - OS Version: `Darwin arm64 25.0.0` - VS Code version: `1.104.1` [eliostruyf.vscode-front-matter-unresponsive.cpuprofile.txt](https://github.com/user-attachments/files/22470959/eliostruyf.vscode-front-matter-unresponsive.cpuprofile.txt) Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load <!-- github-sync-id:3441609941 -->
adam closed this issue 2026-10-05 03:04:00 +02:00
Author
Owner

Hi @rootsongjc, is this for every project you open? Normally, the indexing which happens when you configured it for your project can indeed take some CPU load until it indexed all your content.

How "big" is the project? Number of files it tries to index? You can get this information by running the frontMatter.diagnostics command.

Hi @rootsongjc, is this for every project you open? Normally, the indexing which happens when you configured it for your project can indeed take some CPU load until it indexed all your content. How "big" is the project? Number of files it tries to index? You can get this information by running the `frontMatter.diagnostics` command. <!-- github-comment-id:3319850412 -->
Author
Owner

My Hugo website:
│ ZH │ EN
─────────┼───┼──
Pages │ 1999 │ 798
Paginator pages │ 158 │ 31
Non-page files │ 816 │ 160
Static files │ 244 │ 244
Processed images │ 0 │ 0
Aliases │ 859 │ 204
Cleaned │ 0 │ 0

Front Matter CMS - Diagnostics

Beta: false
Version: 10.9.0
OS: darwin
VSCode version: 1.104.1

Total files

Total files found: 154191

My Configuration

I followed this doc to configure the page folders and exclude some subfolders.

My Hugo website: │ ZH │ EN ─────────┼───┼── Pages │ 1999 │ 798 Paginator pages │ 158 │ 31 Non-page files │ 816 │ 160 Static files │ 244 │ 244 Processed images │ 0 │ 0 Aliases │ 859 │ 204 Cleaned │ 0 │ 0 ## Front Matter CMS - Diagnostics Beta: `false` Version: `10.9.0` OS: `darwin` VSCode version: `1.104.1` ## Total files Total files found: 154191 ## My Configuration I followed [this doc](https://frontmatter.codes/docs/content-creation/content-folders#registering-content-folders) to configure the page folders and exclude some subfolders. <!-- github-comment-id:3320138616 -->
Author
Owner

Thanks, that gives me a bit of insight. So almost 3000 pages, that can indeed take a bit of time to index all. Once it's completed, it should be much faster, as it's starts using the index instead of the individual files.

Thanks, that gives me a bit of insight. So almost 3000 pages, that can indeed take a bit of time to index all. Once it's completed, it should be much faster, as it's starts using the index instead of the individual files. <!-- github-comment-id:3320188468 -->
Author
Owner

In my experience with content and front matter (both YAML and plugin) freezing, it may be related to the way Hugo formats specific front matter (YAML) values when creating content. Date formats without quotation marks ("it's a go time object as opposed to a string"), Titles and descriptions without quotation marks.

Which all might be allowed/valid per standard, except for titles that have colons or even quotations inside. Frontmatter (the plugin) then goes into some form of loop or freezes. When I switched to Astro and set my linting to OCD it complained about these frontmatter values and after having it all quoted both systems stopped having issues with indexing.

Example:

key: some value with "weird" content
key2: some value with another problem: colons in it

Long story short: Frontmatter stopped re-indexing and/or throwing errors for frontmatter after I changed to a very strict quoted frontmatter format for everything.

In my experience with content and front matter (both YAML and plugin) freezing, it may be related to the way Hugo formats specific front matter (YAML) values when creating content. Date formats without quotation marks ("it's a go time object as opposed to a string"), Titles and descriptions without quotation marks. Which all might be allowed/valid per standard, except for titles that have colons or even quotations inside. Frontmatter (the plugin) then goes into some form of loop or freezes. When I switched to Astro and set my linting to OCD it complained about these frontmatter values and after having it all quoted both systems stopped having issues with indexing. Example: ```yaml key: some value with "weird" content key2: some value with another problem: colons in it ``` Long story short: Frontmatter stopped re-indexing and/or throwing errors for frontmatter after I changed to a very strict quoted frontmatter format for everything. <!-- github-comment-id:3321815057 -->
Author
Owner

After optimizing the configuration of frontmatter.json, the issue of nested pageFolder in previous configurations has been resolved, and the python venv directories have been excluded. After one day of observation, the FM extension has not frozen again. This indicates that the above adjustments may have effectively resolved the issue.

After optimizing the configuration of `frontmatter.json`, the issue of nested pageFolder in previous configurations has been resolved, and the python venv directories have been excluded. After one day of observation, the FM extension has not frozen again. This indicates that the above adjustments may have effectively resolved the issue. <!-- github-comment-id:3323860635 -->
Author
Owner

Thanks @davidsneighbour for stepping in!

Thanks @rootsongjc for the update. Glad you found the fix and that you got your CPU load back to normal. ☺️

Thanks @davidsneighbour for stepping in! Thanks @rootsongjc for the update. Glad you found the fix and that you got your CPU load back to normal. ☺️ <!-- github-comment-id:3323905425 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#756