emmet-atom icon indicating copy to clipboard operation
emmet-atom copied to clipboard

Emmet slows down editing Dart files

Open sethladd opened this issue 9 years ago • 7 comments

Hi,

If we have emmet and the dartlang plugin installed, and we're editing a large Dart file (>1000 lines), and we hit 'enter', we see a delay of 1-2 seconds before the newline is inserted.

If we remove the emmet plugin, we no longer see a delay.

Could it be possible that Emmet is trying to do work inside of a Dart file?

Thanks!

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/25698655-emmet-slows-down-editing-dart-files?utm_campaign=plugin&utm_content=tracker%2F535900&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F535900&utm_medium=issues&utm_source=github).

sethladd avatar Aug 12 '15 20:08 sethladd

Here is the plugin: https://github.com/dart-atom/dartlang

sethladd avatar Aug 12 '15 20:08 sethladd

cc @devoncarew

sethladd avatar Aug 12 '15 20:08 sethladd

For background, when we first saw this issue a few weeks ago, I did some profiling in devtools and 90% of the time was spent in emmet and regexs.

devoncarew avatar Aug 12 '15 20:08 devoncarew

Possibly the same issue? #317

patrys avatar Oct 02 '15 10:10 patrys

I had the same problem with every file > 700 lines. I just commented out in packages/emmet/keymaps/emmet.cson:

'atom-pane atom-text-editor[data-grammar~="html"]:not([mini]):not(.autocomplete-active), atom-pane atom-text-editor[data-grammar~="xml"]:not([mini]):not(.autocomplete-active)': 'enter': 'emmet:insert-formatted-line-break-only'

and added a custom one in my own keymap file:

'atom-pane atom-text-editor[data-grammar~="xml"]:not([mini]):not(.autocomplete-active)': 'enter': 'editor:new-line'

When I hit enter, there is no lag anymore.

carstenh avatar May 21 '16 13:05 carstenh

This issue seems to be fixed already?

sergeche avatar Aug 03 '16 11:08 sergeche

the issue still opened ? We need Dart because of Flutter

abdelouahabb avatar May 22 '18 19:05 abdelouahabb