https://bugs.kde.org/show_bug.cgi?id=418778

            Bug ID: 418778
           Summary: Very slow VHDL syntax highlighting
           Product: frameworks-syntax-highlighting
           Version: 5.66.0
          Platform: Manjaro
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: syntax
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: g...@babylon2k.de
  Target Milestone: ---

Created attachment 126746
  --> https://bugs.kde.org/attachment.cgi?id=126746&action=edit
Flamegraph for highlighting /lib/gaisler/leon3v3/iu3.vhd

SUMMARY

The syntax highlighting for VHDL files takes very long to complete.


STEPS TO REPRODUCE

1. Download and extract
https://www.gaisler.com/products/grlib/grlib-gpl-2019.4-b4246.tar.gz (from
https://www.gaisler.com/index.php/downloads/leongrlib)
2. Use kate to open ./lib/gaisler/leon3v3/iu3.vhd from the extracted archive
3. Hit CTRL+END to scroll to the end of the file


OBSERVED RESULT

It takes _very_ long until the end of the file is actually reached.
On my machine this is ~30secs (CPU is an Intel(R) Core(TM) i7-7700K CPU @
4.20GHz)
Note that the file itself is only 190KB large.


EXPECTED RESULT

Much faster syntax highlighting.


SOFTWARE/OS VERSIONS

Linux: Manjaro
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.1 (built against 5.14.0)


ADDITIONAL INFORMATION

Attached is a flamegraph showing that most of the time is spent in libpcre2
(process has been terminated after scrolling to end of file has finished).
Hence I assume this is related to using regular expressions extensively in the
syntax highlighting file.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to