formulahendry / vscode-auto-rename-tag

Automatically rename paired HTML/XML tag
https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag
MIT License
262 stars 36 forks source link

This extension causes +90% Code Helper usage on Mac and PC #22

Open drew-wallace opened 7 years ago

drew-wallace commented 7 years ago

Steps to reproduce:

  1. Open Activity Monitor or Task Manager and note the resting CPU usage of the Code Helper process
  2. Paste this into vscode:
    <div>
    <span>This is just a test</span>
    </div>
  3. Double click the opening span tag
  4. Type a to rename to an anchor tag
  5. Watch the CPU usage of the Code Helper process rise to +90% and stay there.

Note: At this point, auto rename no longer works.

drew-wallace commented 7 years ago

Seems to be causing the same issue as #20, #18, #9, and #5

formulahendry commented 7 years ago

Could not repro on my side. Could you please disable all other extensions and try it again?

bfeeley commented 7 years ago

Having this issue as well. Disabling the extension clears up the issue.

zo commented 7 years ago

Same here, for me it happen with very long tags, like svg paths... (note that it's a self closing tag and it should be ignored by this extension)

I paste a snippet so you can try to reproduce the bug : modifying the <path/> tag in this file always rise CPU usage to 99%. modifying the <svg> tag work correctly and tags are auto renamed. modifying the self-closing <circle/> tag work correctly and is ignored by auto-rename.


<svg viewBox="0 0 100 100">
  <circle cx="0" cy="20" r="20"/>
  <path d="M91.942 91.212c-.676-.312-1.52-.896-1.876-1.3-.355-.402-3.626-5.64-7.267-11.64L67.69 53.38c-4.67-7.69-8.856-14.376-9.303-14.856-2.2-2.36-6.232-1.847-7.897 1.003-.938 1.607-.796 3.486.44 5.82.896 1.687 1.038 2.253 1.043 4.148.013 4.998-3.26 8.313-8.608 8.717-1.873.142-2.525.328-3.23.922-.487.41-4.05 4.64-7.92 9.403-3.87 4.762-7.33 8.924-7.693 9.25-.924.826-3.62 1.02-4.914.35-2.01-1.04-2.89-3.656-1.943-5.782.32-.718 6.184-11.4 13.034-23.74C37.544 36.278 43.374 25.74 43.65 25.2c.998-1.957.39-4.218-1.434-5.33-2.14-1.303-4.003-.56-6.71 2.674-1.063 1.267-2.56 2.82-3.327 3.447-3.72 3.047-4.39 3.18-15.3 3.06l-8.837-.1-1.844-.86c-2.388-1.116-4.01-2.69-5.09-4.945-1.16-2.412-1.4-4.51-.788-6.895.597-2.33 1.556-3.88 3.407-5.51 2.862-2.52.88-2.37 31.663-2.47 19.077-.064 27.955.012 29.348.25 4.27.733 8.29 3.674 10.38 7.593.83 1.556 6.15 16.138 13.595 37.267.982 2.79 3.854 10.88 6.382 17.978 2.528 7.098 4.692 13.345 4.81 13.88.48 2.206-1.046 4.933-3.347 5.978-1.58.717-3.063.716-4.622-.003z"/>
</svg>
ypresto commented 6 years ago

Modifying class attr in below line works fine.

<a class="button is-primary" :download="`speech-${speech.id}`" :href="audio">Download</a>

But modifying ref attr of below line will freeze extension host.

<audio ref="aaa" :src="audio" v-if="playState !== 'unloaded'" @canplaythrough="onCanPlayThrough" @playing="onPlaying" @pause="onPause"/>
LukeCarlThompson commented 6 years ago

I'm having a similar issue. Whenever I edit an SVG file, code-helper goes to 100% cpu usage and stays there even if I shut down VSCode. I have to kill it manually from the activity monitor.

Disabling this extension stops the behaviour.