-
Notifications
You must be signed in to change notification settings - Fork 24
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
Very slow when create a new refresh dart file in flutter project and typing code myself if enable lsp-dart-show-flutter-outline
.
#127
Comments
Hum, that's weird, I use native-comp and can't repro this. any thoughts @yyoncho ? |
Hi, i can always reproduce this. followiing is a guide:
|
thanks, I'll follow that and try to understand what is happening |
Following is a new bug output with very few packages. Debugger entered--Lisp error: (error "Timeout while waiting for response. Method: textD...") |
it could be a server bug as well, what flutter/dart version are you using? |
Are you reproduce success? i tested just now, i can reproduce with only following config: (require 'dart-mode)
(require 'lsp-mode)
(require 'lsp-dart)
(require 'lsp-ui)
(require 'lsp-modeline)
(require 'lsp-headerline)
(require 'lsp-treemacs)
(require 'dap-mode)
(require 'dap-ui)
(require 'dap-mouse)
(require 'flycheck)
(require 'company)
(add-hook 'dart-mode-hook 'lsp)
(add-to-list 'auto-mode-alist '("\\.dart\\'" . dart-mode))
|
Let me try testing with your flutter version |
Sorry, maybe i describe not so accurately. in fact, when i start you can add somethings, and then delete it use backspace. |
Even so, nothing lagging to me, will test with your flutter, one sec |
so it could be a performance issue on flutter widget-guide, could you try disabling it? I know it's a feature that can be slow on huge buffers |
@zw963 tested with your same flutter version and no signs of slowness on both features, I'm using Emacs 28 from master though, but I doubt it's related |
what is your output of |
done, still same. BTW: i am now test on a new created flutter project ... only one file, main.dart, and this issue never happen if not enable flutter-outline.
|
I usually use https://github.com/ericdallo/flutter_sample for testing lsp-dart stuff |
This one could affect this issue:
Mine is here: https://github.com/ericdallo/dotfiles/blob/master/.doom.d/config.el#L36 |
It so wired it not slow when i pull your's flutter sample, and edit on it. but, i a run |
or, you can try on this i created just now. |
Sure, will test it |
I test use this config, a little better, but, still much slow than not enable flutter guides |
No clue, sounds like some missing emacs optimization |
are you install emacs use compile? could you please share your's configure config? |
Your's emacs IDE is so so so fast! |
Sure, I use doom-emacs and all my OS config including emacs config is here
doom-emacs is fast! it byte compiles all packages and native byte-compiles if using native-comp emacs, you can follow this to setup it: https://github.com/hlissner/doom-emacs#install |
What i means is, your's emacs editor is compile from source code, right? could you please share your's configure ? |
Oh, I use NixOS and use the emacs from here as my config specifies here. It basically download emacs master branch and compiles it, I don't know the specific details emacsGcc overlay does though |
I am compile emacs 28 use newest emacs-28 branch. If you said this is emacs optimization issue, i guess maybe cause by gcmh or auto-compile, those are only two package when i test new minimum config, i will test it after compile done, let you know the result. |
Cool linux, i am a arch linux user, some guy migrate from arch to NixOS ... |
same issue after recompile + disable GCMH mode, i will recompile again without is there any other emacs optimization suit for lsp-dart? |
I don't think so, never saw this kind of performance issue besides configs 🤔 |
definitely not config issue, because i remove all my config, except set load path, only left following line config in my $HOME/.emacs, the only entry. (require 'dart-mode)
(require 'lsp-mode)
(require 'lsp-dart)
(require 'lsp-ui)
(require 'lsp-modeline)
(require 'lsp-headerline)
(require 'lsp-treemacs)
(require 'dap-mode)
(require 'dap-ui)
(require 'dap-mouse)
(require 'flycheck)
(require 'company)
(setq lsp-dart-flutter-widget-guides nil)
(add-hook 'dart-mode-hook 'lsp)
(add-to-list 'auto-mode-alist '("\\.dart\\'" . dart-mode)) |
yes, |
Not work, can we add a command to disable it if enable it unexpectedly occasionally. BTW, if i run i don't know why, after bring flutter outline back foreground, it start lag again. |
Hi, @ericdallo , i found the different! you test code use if i use former command, never slow too. I don't know the different about both command, but, it seem like flutter on have icons. dart one no icon. I guess those icon cause this issue? can we test on both command, but not enable icon? |
I doubt it's the icon, but it worth the test |
When use with |
Good news @zw963 for me the flutter outline is slow as well!, there is certainly something to improve on lsp-dart :) |
@zw963 fixed on master, keep in mind it requires latest |
@ericdallo , i try several times, both of them start lsp failed.
|
@zw963 that error doesn't seem related, probably some bad compiled package... |
Okay, i will compile all package again, in fact, i compiled it several hours ago, because i add a config which adviced by lsp offical document. (setq lsp-use-plists t) And, i use both of master, i can saw both changes are relative to this issue, if lsp-dart not work with above lsp config? |
sorry, i need more time to test, just ignore my previous comment. |
Hi, @ericdallo , i can confirm, when i set so, should i create a new issue for this? please check https://emacs-lsp.github.io/lsp-mode/page/performance/ |
I never managed to make lsp-use-plists work for me, but I don't think it's a issue on lsp-dart. |
@ericdallo , i consider if we introduce new bug after this change. e.g. assume current opened buffer is 1.dart, i open flutter outline, it show 1.dart outline, it was as expected. then, i open another one 2.dart buffer in another window, outline get updated as expected too. but, when i switch back to 1.dart, flutter outline never updated. All i have to do is, run |
it's a old bug and not a new one, please open an issue with details so we can track the issue |
Describe the bug
I create a new file like this:
When i start o editing this file, key strikeis very very slow, after pressing key and before char show on buffer, need wait several seconds, following is profiler result.
But, if editing on a exists file, it is Okay.
Sorry for i don't know how to disable native compile for this case.
The text was updated successfully, but these errors were encountered: