CodeblockCustomizer icon indicating copy to clipboard operation
CodeblockCustomizer copied to clipboard

Obsidian file explorer extremely laggy when this plugin in enabled

Open rachelkd opened this issue 1 year ago • 27 comments

It takes a moment to move files into folders in the Obsidian file explorer with this plugin enabled.

Here's a link to a video: https://imgur.com/a/fWylRKm

Here is the data.json file, if that helps:

{
  "Themes": {
    "Obsidian": {
      "baseTheme": "Obsidian",
      "settings": {
        "codeblock": {
          "enableLineNumbers": true,
          "enableActiveLineHighlight": true,
          "codeBlockBorderStylingPosition": "disable",
          "showIndentationLines": false,
          "enableLinks": false,
          "enableLinkUpdate": false,
          "enableBracketHighlight": true,
          "highlightNonMatchingBrackets": true,
          "inverseFold": false,
          "enableSelectionMatching": false,
          "unwrapcode": false,
          "buttons": {
            "alwaysShowButtons": false,
            "alwaysShowCopyCodeButton": false,
            "enableSelectCodeButton": false,
            "enableDeleteCodeButton": false,
            "enableWrapCodeButton": false
          },
          "enableDeleteCodeButton": false,
          "enableCopyCodeButton": false,
          "textHighlight": true
        },
        "textHighlight": {
          "lineSeparator": "",
          "textSeparator": ""
        },
        "semiFold": {
          "enableSemiFold": false,
          "visibleLines": 5,
          "showAdditionalUncollapseButon": false
        },
        "header": {
          "boldText": false,
          "italicText": false,
          "collapseIconPosition": "hide",
          "collapsedCodeText": "",
          "codeblockLangBoldText": true,
          "codeblockLangItalicText": true,
          "alwaysDisplayCodeblockLang": false,
          "alwaysDisplayCodeblockIcon": false,
          "displayCodeBlockLanguage": true,
          "displayCodeBlockIcon": false,
          "disableFoldUnlessSpecified": false
        },
        "gutter": {
          "highlightActiveLineNr": true,
          "enableHighlight": true
        },
        "inlineCode": {
          "enableInlineCodeStyling": false
        },
        "printing": {
          "enablePrintToPDFStyling": false,
          "forceCurrentColorUse": false,
          "uncollapseDuringPrint": true
        },
        "common": {
          "enableInSourceMode": false
        },
        "enableEditorActiveLineHighlight": true
      },
      "colors": {
        "dark": {
          "codeblock": {
            "activeLineColor": "--color-base-30",
            "backgroundColor": "--code-background",
            "highlightColor": "--text-highlight-bg",
            "alternateHighlightColors": {},
            "languageBorderColors": {},
            "textColor": "#A30505",
            "bracketHighlightColorMatch": "#f33bff",
            "bracketHighlightColorNoMatch": "#FF0000",
            "bracketHighlightBackgroundColorMatch": "--color-base-30",
            "bracketHighlightBackgroundColorNoMatch": "--color-base-30",
            "selectionMatchHighlightColor": "#99ff7780"
          },
          "header": {
            "backgroundColor": "--code-background",
            "textColor": "--text-normal",
            "lineColor": "--color-base-30",
            "codeBlockLangTextColor": "--code-comment",
            "codeBlockLangBackgroundColor": "--code-background"
          },
          "gutter": {
            "textColor": "--text-faint",
            "backgroundColor": "--code-background",
            "activeLineNrColor": "--text-muted"
          },
          "inlineCode": {
            "backgroundColor": "--code-background",
            "textColor": "--code-normal"
          },
          "editorActiveLineColor": "--color-base-20",
          "languageSpecificColors": {}
        },
        "light": {
          "codeblock": {
            "activeLineColor": "--color-base-30",
            "backgroundColor": "--code-background",
            "highlightColor": "--text-highlight-bg",
            "alternateHighlightColors": {},
            "languageBorderColors": {},
            "textColor": "#A30505",
            "bracketHighlightColorMatch": "#f33bff",
            "bracketHighlightColorNoMatch": "#FF0000",
            "bracketHighlightBackgroundColorMatch": "--color-base-30",
            "bracketHighlightBackgroundColorNoMatch": "--color-base-30",
            "selectionMatchHighlightColor": "#99ff7780"
          },
          "header": {
            "backgroundColor": "--code-background",
            "textColor": "--text-normal",
            "lineColor": "--color-base-30",
            "codeBlockLangTextColor": "--code-comment",
            "codeBlockLangBackgroundColor": "--code-background"
          },
          "gutter": {
            "textColor": "--text-faint",
            "backgroundColor": "--code-background",
            "activeLineNrColor": "--text-muted"
          },
          "inlineCode": {
            "backgroundColor": "--code-background",
            "textColor": "--code-normal"
          },
          "editorActiveLineColor": "--color-base-20",
          "languageSpecificColors": {}
        }
      }
    },
    "Solarized": {
      "baseTheme": "Solarized",
      "settings": {
        "codeblock": {
          "enableLineNumbers": true,
          "enableActiveLineHighlight": true,
          "codeBlockBorderStylingPosition": "disable",
          "showIndentationLines": false,
          "enableLinks": false,
          "enableLinkUpdate": false,
          "enableBracketHighlight": true,
          "highlightNonMatchingBrackets": true,
          "inverseFold": false,
          "enableSelectionMatching": false,
          "unwrapcode": false,
          "buttons": {
            "alwaysShowButtons": false,
            "alwaysShowCopyCodeButton": false,
            "enableSelectCodeButton": false,
            "enableDeleteCodeButton": false,
            "enableWrapCodeButton": false
          },
          "enableDeleteCodeButton": false,
          "enableCopyCodeButton": false,
          "textHighlight": true
        },
        "textHighlight": {
          "lineSeparator": "",
          "textSeparator": ""
        },
        "semiFold": {
          "enableSemiFold": false,
          "visibleLines": 5,
          "showAdditionalUncollapseButon": false
        },
        "header": {
          "boldText": false,
          "italicText": false,
          "collapseIconPosition": "hide",
          "collapsedCodeText": "",
          "codeblockLangBoldText": true,
          "codeblockLangItalicText": true,
          "alwaysDisplayCodeblockLang": false,
          "alwaysDisplayCodeblockIcon": false,
          "displayCodeBlockLanguage": true,
          "displayCodeBlockIcon": false,
          "disableFoldUnlessSpecified": false
        },
        "gutter": {
          "highlightActiveLineNr": false,
          "enableHighlight": false
        },
        "inlineCode": {
          "enableInlineCodeStyling": false
        },
        "printing": {
          "enablePrintToPDFStyling": false,
          "forceCurrentColorUse": false,
          "uncollapseDuringPrint": true
        },
        "common": {
          "enableInSourceMode": false
        },
        "enableEditorActiveLineHighlight": true
      },
      "colors": {
        "dark": {
          "codeblock": {
            "activeLineColor": "#073642",
            "backgroundColor": "#002B36",
            "highlightColor": "#054b5c",
            "alternateHighlightColors": {},
            "languageBorderColors": {},
            "textColor": "#A30505",
            "bracketHighlightColorMatch": "#36e920",
            "bracketHighlightColorNoMatch": "#FF0000",
            "bracketHighlightBackgroundColorMatch": "#073642",
            "bracketHighlightBackgroundColorNoMatch": "#073642",
            "selectionMatchHighlightColor": "#99ff7780"
          },
          "header": {
            "backgroundColor": "#0a4554",
            "textColor": "#DADADA",
            "lineColor": "#46cced",
            "codeBlockLangTextColor": "#000000",
            "codeBlockLangBackgroundColor": "#008080"
          },
          "gutter": {
            "textColor": "#6c6c6c",
            "backgroundColor": "#073642",
            "activeLineNrColor": "#DADADA"
          },
          "inlineCode": {
            "backgroundColor": "#054b5c",
            "textColor": "#DADADA"
          },
          "editorActiveLineColor": "#468eeb33",
          "languageSpecificColors": {}
        },
        "light": {
          "codeblock": {
            "activeLineColor": "#EDE8D6",
            "backgroundColor": "#FCF6E4",
            "highlightColor": "#E9DFBA",
            "alternateHighlightColors": {},
            "languageBorderColors": {},
            "textColor": "#A30505",
            "bracketHighlightColorMatch": "#ff01f7",
            "bracketHighlightColorNoMatch": "#FF0000",
            "bracketHighlightBackgroundColorMatch": "#EDE8D6",
            "bracketHighlightBackgroundColorNoMatch": "#EDE8D6",
            "selectionMatchHighlightColor": "#99ff7780"
          },
          "header": {
            "backgroundColor": "#D5CCB4",
            "textColor": "#866704",
            "lineColor": "#EDD489",
            "codeBlockLangTextColor": "#C25F30",
            "codeBlockLangBackgroundColor": "#B8B5AA"
          },
          "gutter": {
            "textColor": "#6c6c6c",
            "backgroundColor": "#EDE8D6",
            "activeLineNrColor": "#866704"
          },
          "inlineCode": {
            "backgroundColor": "#E9DFBA",
            "textColor": "#866704"
          },
          "editorActiveLineColor": "#60460633",
          "languageSpecificColors": {}
        }
      }
    }
  },
  "ExcludeLangs": "dataview, ad-*",
  "SelectedTheme": {
    "baseTheme": "Obsidian",
    "settings": {
      "codeblock": {
        "enableLineNumbers": true,
        "enableActiveLineHighlight": false,
        "codeBlockBorderStylingPosition": "disable",
        "showIndentationLines": true,
        "enableLinks": false,
        "enableLinkUpdate": false,
        "enableBracketHighlight": true,
        "highlightNonMatchingBrackets": true,
        "inverseFold": false,
        "enableSelectionMatching": false,
        "unwrapcode": true,
        "buttons": {
          "alwaysShowButtons": false,
          "alwaysShowCopyCodeButton": false,
          "enableSelectCodeButton": false,
          "enableDeleteCodeButton": false,
          "enableWrapCodeButton": false
        },
        "enableDeleteCodeButton": false,
        "enableCopyCodeButton": false,
        "textHighlight": true
      },
      "textHighlight": {
        "lineSeparator": "",
        "textSeparator": ""
      },
      "semiFold": {
        "enableSemiFold": false,
        "visibleLines": 5,
        "showAdditionalUncollapseButon": false
      },
      "header": {
        "boldText": false,
        "italicText": false,
        "collapseIconPosition": "hide",
        "collapsedCodeText": "",
        "codeblockLangBoldText": true,
        "codeblockLangItalicText": true,
        "alwaysDisplayCodeblockLang": false,
        "alwaysDisplayCodeblockIcon": false,
        "displayCodeBlockLanguage": false,
        "displayCodeBlockIcon": false,
        "disableFoldUnlessSpecified": false
      },
      "gutter": {
        "highlightActiveLineNr": true,
        "enableHighlight": true
      },
      "inlineCode": {
        "enableInlineCodeStyling": false
      },
      "printing": {
        "enablePrintToPDFStyling": true,
        "forceCurrentColorUse": true,
        "uncollapseDuringPrint": true
      },
      "common": {
        "enableInSourceMode": false
      },
      "enableEditorActiveLineHighlight": false
    },
    "colors": {
      "dark": {
        "codeblock": {
          "activeLineColor": "--color-base-30",
          "backgroundColor": "--code-background",
          "highlightColor": "--text-highlight-bg",
          "alternateHighlightColors": {},
          "languageBorderColors": {},
          "textColor": "#A30505",
          "bracketHighlightColorMatch": "#f33bff",
          "bracketHighlightColorNoMatch": "#FF0000",
          "bracketHighlightBackgroundColorMatch": "--color-base-30",
          "bracketHighlightBackgroundColorNoMatch": "--color-base-30",
          "selectionMatchHighlightColor": "#99ff7780"
        },
        "header": {
          "backgroundColor": "--code-background",
          "textColor": "--text-normal",
          "lineColor": "--color-base-30",
          "codeBlockLangTextColor": "--code-comment",
          "codeBlockLangBackgroundColor": "--code-background"
        },
        "gutter": {
          "textColor": "--text-faint",
          "backgroundColor": "--code-background",
          "activeLineNrColor": "--text-muted"
        },
        "inlineCode": {
          "backgroundColor": "--code-background",
          "textColor": "--code-normal"
        },
        "editorActiveLineColor": "--color-base-20",
        "languageSpecificColors": {}
      },
      "light": {
        "codeblock": {
          "activeLineColor": "--color-base-30",
          "backgroundColor": "--code-background",
          "highlightColor": "--text-highlight-bg",
          "alternateHighlightColors": {},
          "languageBorderColors": {},
          "textColor": "#A30505",
          "bracketHighlightColorMatch": "#526FC0",
          "bracketHighlightColorNoMatch": "#DE8D8D",
          "bracketHighlightBackgroundColorMatch": "#E4D7C3",
          "bracketHighlightBackgroundColorNoMatch": "--color-base-30",
          "selectionMatchHighlightColor": "#99ff7780"
        },
        "header": {
          "backgroundColor": "--code-background",
          "textColor": "--text-normal",
          "lineColor": "--color-base-30",
          "codeBlockLangTextColor": "--code-comment",
          "codeBlockLangBackgroundColor": "--code-background"
        },
        "gutter": {
          "textColor": "--text-faint",
          "backgroundColor": "--code-background",
          "activeLineNrColor": "--text-muted"
        },
        "inlineCode": {
          "backgroundColor": "--code-background",
          "textColor": "--code-normal"
        },
        "editorActiveLineColor": "--color-base-20",
        "languageSpecificColors": {}
      }
    }
  },
  "ThemeName": "Obsidian",
  "newThemeName": "",
  "alternateHighlightColorName": "",
  "languageBorderColorName": "",
  "foldAllCommand": false,
  "settingsType": "codeblock",
  "langSpecificSettingsType": "",
  "languageSpecificLanguageName": ""
}

rachelkd avatar Nov 12 '24 21:11 rachelkd

What Theme are you using? Could you try out other themes if the problem still persists?

mugiwara85 avatar Nov 13 '24 03:11 mugiwara85

I have the same issue. I'm using the Minimal theme, but even if I switch to the default theme, the problem still occurs. My typing and input become noticeably laggy, especially when inputting Chinese.

Porco24 avatar Nov 24 '24 07:11 Porco24

@Porco24 The issue was about that the file explorer is laggy, but what you are describing is that different. You are describing that typing and input is laggy. Do you also experience laggy behavior in the file explorer? When is your input laggy? In bigger or smaller documents? Could you show me a video?

mugiwara85 avatar Nov 24 '24 08:11 mugiwara85

@mugiwara85 I mean I have file explorer Issue, and typing Issued I will put the typing problem in a new Issues later

Porco24 avatar Nov 24 '24 08:11 Porco24

@Porco24 when do you experience the lagging in the file explorer? When moving (dragging) a document or heading?

mugiwara85 avatar Nov 24 '24 13:11 mugiwara85

@mugiwara85 Sorry, I didn't quite understand what "Moving Heading" means. The issue I'm experiencing is the same as the one shown in the issue video—it occurs when I try to move a file's location.

Porco24 avatar Nov 24 '24 13:11 Porco24

You can "grab" a heading, by pressing the left mouse button and then "dragging" it :) Ok, thanks, I will look into both issues.

mugiwara85 avatar Nov 24 '24 14:11 mugiwara85

Same issue here with the extreme slowness/lagging when dragging files in the file explorer. on the latest version 1.2.8.

Recording for my case - https://imgur.com/ocpH2gb

Any update would be appreciated. Thanks.

dkzsys avatar Jan 24 '25 04:01 dkzsys

@dkzsys Same question for you. What Theme are you using?

mugiwara85 avatar Jan 24 '25 12:01 mugiwara85

Same issue here, I tried themes:"minimal, pisum, defualt", same issue always there. It's very laggy when I'm dragging in outline and explorer. It seems that it's slightly quick in default theme light mode. And after dragging, the dragged heading will lose in the outline.

sunhq02 avatar Jan 24 '25 13:01 sunhq02

Hi @mugiwara85 , I normally use Minimal, and have tried the default theme. Both experiencing the same extreme lag.

dkzsys avatar Jan 25 '25 04:01 dkzsys

@mugiwara85 I've spent some time playing with it, and managed to reproduce the lag. Got some extra diagnostic info for your investigation:

  • I've created a new test vault and copied the entire .obsidian config directory; enabled all community plugins. File Exploring dragging lag does NOT happen.
  • However, after I copied all my notes to the new vault, and after indexing, drag lag started to happen - and the lag is average.
  • After I deleted all my notes, without restarting obsidian or re-openning the test vault, the lag persists.
  • After I closed and re-opened the test vault, the lag disappeared.

dkzsys avatar Jan 25 '25 11:01 dkzsys

What Theme are you using? Could you try out other themes if the problem still persists?

I am using Primary theme. I have uninstalled the plugin since then, but I did turn off all other plugins but the code styler plugin, restarted, disabled themes, and the file drag lag still persisted.

rachelkd avatar Jan 25 '25 18:01 rachelkd

I am using Primary theme. I have uninstalled the plugin since then, but I did turn off all other plugins but the code styler plugin, restarted, disabled themes, and the file drag lag still persisted.

I have a different experience to that of @rachelkd.

On my primary vault, I have disabled Codeblock Customizer; installed and enabled Code Styler plugin. Drag lag no long exists.

I personally still prefer Codeblock Customizer and am hoping that this can be fixed and continue using it.

dkzsys avatar Jan 26 '25 04:01 dkzsys

I updated Obsidian to v1.8.3 today, the drag lag is no longer happening to my vault.

(Obsidian "Check for updates" is finally redirecting to its website for a manual v1.8 "major" release update.)

dkzsys avatar Jan 31 '25 01:01 dkzsys

I updated Obsidian to v1.8.3 today, the drag lag is no longer happening.

(Obsidian "Check for updates" is finally redirecting to its website for a manual v1.8 "major" release update.)

Still persists for me

rachelkd avatar Jan 31 '25 02:01 rachelkd

Sorry, for the delay guys. I just had to prepare for a hardcore exam. I will fix it this week. This is a CSS issue.

mugiwara85 avatar Jan 31 '25 10:01 mugiwara85

@rachelkd @dkzsys @sunhq02 @Porco24 I just wanted to fix this problem, and I could also reproduce it. I saw that Obsidian has an update available, so I updated to v1.8.4, and now I can't reproduce the error. Could you guys confirm if the problem still persists or is it working fine now?

mugiwara85 avatar Feb 03 '25 12:02 mugiwara85

I just wanted to fix this problem, and I could also reproduce it.

Thank you, @mugiwara85!

saw that Obsidian has an update available, so I updated to v1.8.4, and now I can't reproduce the error.

I had similar experience - as soon as I updated Obsidian to v1.8.3, the lag disappeared. @rachelkd did report that he still had the problem after the update. Perhaps they can provide some input.

dkzsys avatar Feb 03 '25 22:02 dkzsys

I updated Obsidian to v1.8.4,still lag. but nolonger lose the dragged heading in the outline.

sunhq02 avatar Feb 05 '25 02:02 sunhq02

I updated Obsidian to v1.8.4,still lag. but nolonger lose the dragged heading in the outline.

@sunhq02 Then what kind of lag do you experience? When you type? This issue is not about the typing lag problem. There is another issue for that.

mugiwara85 avatar Feb 06 '25 08:02 mugiwara85

I updated Obsidian to v1.8.4,still have this error

Porco24 avatar Feb 06 '25 08:02 Porco24

I updated Obsidian to v1.8.4,still lag. but nolonger lose the dragged heading in the outline.

@sunhq02 Then what kind of lag do you experience? When you type? This issue is not about the typing lag problem. There is another issue for that.

I metioned it two weeks ago, maybe you overlooked it.

It's very laggy when I'm dragging in outline and explorer. It seems that it's slightly quick in default theme light mode. And after dragging, the dragged heading will lose in the outline.(v1.7)

After updated, nolonger lose the dragged headings in the outline.

sunhq02 avatar Feb 07 '25 02:02 sunhq02

Also laggy with the Code Styler Obsidian plugin but I didnt notice because I use Quiet Outline instead of the built in outline plugin.

BindingOx avatar Feb 08 '25 01:02 BindingOx

Hey! Can still confirm this is an issue on Obsidian v1.8.9. This in fact still persists across themes (default theme included). For some reason, it does not happen in a Sandbox vault, and re-installing the plugin does not do anything.

rachelkd avatar Mar 16 '25 04:03 rachelkd

@rachelkd @BindingOx @Porco24 Unfortunately, I can't reproduce this issue anymore. I even installed Obsidian 1.8.3 on a VM without internet access (so it can't update itself), but still no luck. Can you reproduce the issue in a new Vault? Did you try to disable all of your plugins and custom CSS, and enable them one by one, to see if maybe one of them causes the error?

mugiwara85 avatar Apr 20 '25 19:04 mugiwara85

@rachelkd @BindingOx @Porco24 I found a theme, where I could finally reproduce the problem. Can you please take the the current styles.css and main.js to check if the problem persists? It should be fixed now. Please let me know if it works.

mugiwara85 avatar May 14 '25 23:05 mugiwara85

Fixed in version 1.3.0

mugiwara85 avatar Aug 15 '25 00:08 mugiwara85