-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running Save Participants with AL Format is slow since the VSCode January '20 update #5664
Comments
I have the same exact issue since this update. Happening on vscode insiders and regular. |
I'm getting the same thing. Everything worked fine before the update, I am formatting using the Prettier extension. |
Seeing the same issue |
Disabling formatonsave and doing a manual format document seems to improve speed a lot ... |
Still seeing this in, format on save used to be fast and worked always, not only for [al], but happens also with .js, .jsx and stylus files.
|
I've also encountered this problem, “Quick Fixes” runs a long time. |
This issue is very annoying. I'm using PHP, PHP Code Beautifier, and PHP Codesniffer. I had to disable all three. |
vsocde is trying to execute it is not definied in any config file that he should format it with eslint^^ // settings.json
{
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[json]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"atomKeymap.promptV3Features": true,
"colorize.languages": ["css", "sass", "scss", "less", "postcss", "sss", "stylus", "xml", "svg", "javascript", "javascriptreact", "typescript", "typescriptreact"],
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"editor.largeFileOptimizations": false,
"editor.minimap.enabled": true,
"editor.renderIndentGuides": false,
"editor.renderWhitespace": "none",
"editor.rulers": [100],
"editor.showFoldingControls": "always",
"editor.tabSize": 2,
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},
"emmet.syntaxProfiles": {
"javascript": ["js", "jsx"]
},
"eslint._legacyModuleResolve": true,
"eslint.alwaysShowStatus": true,
"eslint.packageManager": "yarn",
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"files.associations": {
"*.graphqls": "graphql"
},
"files.autoSave": "off",
"files.eol": "\n",
"files.participants.timeout": 0,
"git.autofetch": true,
"git.enableSmartCommit": true,
"git.inputValidationSubjectLength": 72,
"javascript.updateImportsOnFileMove.enabled": "always",
"javascript.validate.enable": false,
"material-icon-theme.showUpdateMessage": false,
"npm.enableScriptExplorer": true,
"npm.scriptExplorerAction": "run",
"peacock.affectActivityBar": false,
"peacock.affectTitleBar": false,
"peacock.favoriteColors": [{
"name": "Angular Red",
"value": "#b52e31"
}, {
"name": "Auth0 Orange",
"value": "#eb5424"
}, {
"name": "Azure Blue",
"value": "#007fff"
}, {
"name": "C# Purple",
"value": "#68217A"
}, {
"name": "Gatsby Purple",
"value": "#639"
}, {
"name": "Go Cyan",
"value": "#5dc9e2"
}, {
"name": "Java Blue-Gray",
"value": "#557c9b"
}, {
"name": "JavaScript Yellow",
"value": "#f9e64f"
}, {
"name": "Mandalorian Blue",
"value": "#1857a4"
}, {
"name": "Node Green",
"value": "#215732"
}, {
"name": "React Blue",
"value": "#00b3e6"
}, {
"name": "Something Different",
"value": "#832561"
}, {
"name": "Vue Green",
"value": "#42b883"
}],
"scm.defaultViewMode": "tree",
"sync.autoDownload": false,
"sync.autoUpload": false,
"sync.forceDownload": false,
"sync.gist": "140cb49bd5ae6404af78e9636059cd89",
"sync.quietSync": false,
"sync.removeExtensions": true,
"sync.syncExtensions": true,
"terminal.integrated.rendererType": "auto",
"terminal.integrated.scrollback": 10000,
"typescript.tsserver.log": "verbose",
"window.zoomLevel": 0,
"workbench.activityBar.visible": true,
"workbench.colorTheme": "One Monokai",
"workbench.editor.showTabs": true,
"workbench.iconTheme": "material-icon-theme",
"workbench.sideBar.location": "left",
"workbench.startupEditor": "welcomePage",
"workbench.tree.renderIndentGuides": "none"
} |
@ChiefORZ it looks like vscode-eslint is your formatter for javascript and JSON. |
@photocurio ya, of course. but isnt it strange that he tried to convert a |
experiencing this also lately. it works ok for a while after restart but then becomes slow. |
@fvet Would you be able to provide some more information? Are you still experiencing this issue with the newest version of the AL extension and with a newer version of VS Code different from 1.42? I suspect this issue might be more related to VS Code itself as per these two: |
Past weeks, I've worked on the AL insider vsix (6.x version), now I'm working on AL Version 5.0.320540 and still experiencing the delay a lot, all linked to the 'FormatOnSave', disabling this solves the issue. I can't provide a repro here, since the project I'm working in contains 4500+ files. You can always remotely debug if really needed. VS Code |
Thanks @fvet ! We were concerned that the FormatOnSave is completely blocking the save experience. From our testing, it appears to be related to the performance of the format command when working with large projects. We will continue working on performance improvements in the next months and follow up. |
I had a similar problem with saving AL files: it took several minutes to do that. After setting the property "al.enableCodeAnalysis" to "false" in settings.json file the problem was solved. I don't know if it is exactly the same problem/reason, but VS Code was also showing, that the Formatter is running. |
@yurim108, disabling CodeAnalysis is only a workaround. VS Code should be able to support both CodeAnalysis and AutoFormat next to each other in a single workspace. I'm often updating lots of objects (regex replace, ...) or when working with 'larger' objects / objects used in a wide area of the application, FormatOnSave just slows down the entire process, but don't want to give up CodeAnalysis, since we expect to be alerted on warnings / errors in the same operation. |
I've had this issue seemingly for the life of BC AL development and it appears to be getting worse. Over the past two days, simple file changes will completely lock up VS Code not infrequently |
Same issue here. The format on save is slow, but so is the auto complete (ctrl+space), find references, go to source, etc. It all slows a lot in bigger projects. I don't know if the code analysis is what slows this down, or if it's just vs code struggling with larger files now. |
Same. The issue is consuming so mush time that we had to turn it off. |
Same issue, formatOnSave is currently way too time consuming. VSCODE: 1.52.1 |
This was the work around for me. |
@mjmatthiesen Two apps with round about 200 AL files. In case the setting changed nothing on your side: Have you checked whether it applies to the right scope (User, Workspace, Folder), thus it is not overruled by another scope setting? |
It's scoped to just the project. Regardless of file size, it struggles a lot, but maybe it's just a problem with the performance available. |
This bug still seems to be open.
|
@kalberes could you share some tips on how to mitigate this issue? |
There is nothing new to be added but what has been said. |
Describe the bug
We're actively using FormatOnSave for our al files. Until a week ago, everything worked fine and we did not notice a major delay when saving our files.
"[al]": {"editor.formatOnSave": true }
However, since the VSCode January '20 update, the release notes states that background tasks of extensions during save (such as the Format Document) now show in a notification window ("Running Save Participants ...")
We've seen cases where autoFormat now takes several minutes instead, forcing us to close the notification window. Maybe related, but since the last VS Code update, we also faced numerous times that files cannot be saved / closed, forcing us to kill VS Code.
Screenshots
Versions:
The text was updated successfully, but these errors were encountered: