Author Topic: Why does SlickEdit lock up for a few seconds on every keystroke with SVG?  (Read 3020 times)

spongyryno

  • Community Member
  • Posts: 55
  • Hero Points: 0
I have a very fast machine (i9-12900KF, 3.2GHz, 16 core, 24 thread, with 64GB RAM), and yet when I edit an SVG file, it seems that the whole editor freezes for a few seconds almost every keystroke I type.

Why is this?

By comparison, VSCode never experiences any kind of lock-up.

Here's a repro. Put this into an SVG file:

Code: [Select]
<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"[]>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px" y="0px" height="1024px" width="1024px" xml:space="preserve">

...and then go to the bottom of the file and type in a "<" (less-than sign) to start a tag or close-tag. You'll see how bad it is.

What is SlickEdit doing, and if it's something that's that inefficient, how can I turn it off?

I'm running v28.0.0.6 64-bit Qt5.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7093
  • Hero Points: 539
Try turning off Auto-Completion and Auto-list members:

* Go to Tools>Options>Languages>XML/Text Languages>Completion Options
* uncheck "Auto-list members"
* Go to Tools>Options>Languages>XML/Text Languages>Auto-Complete
* uncheck "Enable auto-completion"

If you want a completion list for tags or attributes, you can type Alt+Dot.

spongyryno

  • Community Member
  • Posts: 55
  • Hero Points: 0
Thanks for the reply.

I tried that... it doesn't appear to make a difference. I restarted SlickEdit and tried again, with those settings as described... it still seems to be just as bad.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7093
  • Hero Points: 539
Try downloading and loading the attached hot fix. Help>Product Updates...>Load Hot Fix...

« Last Edit: December 23, 2023, 06:43:48 PM by Clark »

spongyryno

  • Community Member
  • Posts: 55
  • Hero Points: 0
This made a huge difference. Thanks! What was the problem that was fixed?  :)

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7093
  • Hero Points: 539
For v28, the processing of the DTD is done on a thread. However, the resulting color coding for the file is updated on the main thread and this was taking too long. I changed the code to only do this again if it appears that the DTD has changed. In v27, all of this was done on the main thread when you open the file and never again.