Bug 382332 - custom script formatter is slow
Summary: custom script formatter is slow
Status: RESOLVED WORKSFORME
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: 5.1.1
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-14 10:25 UTC by programmerjake
Modified: 2022-12-06 05:21 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description programmerjake 2017-07-14 10:25:58 UTC
I have clang-format 3.7 setup as a custom script formatter, when I format a 7k line file, it takes about 20s. If I run clang-format from the command line it takes about 90ms.
If I tell KDevelop to reload the file instead of format, it takes <1s.

I have a Ryzen 5 1500X, a SSD, 16GB of 2133MHz RAM, and a RX 550 over PCIe 3, so my hardware should not be the limiting factor.
Comment 1 Kevin Funk 2017-07-14 10:34:50 UTC
That's very odd, did you check the debug output when running KDevelop in a terminal?
Comment 2 programmerjake 2017-07-15 01:05:10 UTC
Running it in a terminal didn't produce anything significant.

I deleted my entire KDE user-specific state to ensure it wasn't a messed up config file. I then setup my kdevelop settings, closed it, reran kdevelop, tried formatting a file, then closed it again. It still exhibits the slow-formatting problem.

Here's the terminal output for the second run:

Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 80: saw unknown, expected number
"applications.menu"  not found in  ("/home/jacob/.config/menus", "/etc/xdg/menus") 

kdevplatform.shell: Not loading plugin named "KDevWelcomePage" because it has been disabled!
kf5.kio.core: couldn't create slave: "Unknown protocol 'man'."
trying to load "/tmp/.mount_sJVsZQ/usr/lib/qt5/plugins/kf5/kio/file.so" from "/tmp/.mount_sJVsZQ/usr/lib/qt5/plugins/kf5/kio/file.so"
trying to load "/tmp/.mount_sJVsZQ/usr/lib/qt5/plugins/kf5/kio/file.so" from "/tmp/.mount_sJVsZQ/usr/lib/qt5/plugins/kf5/kio/file.so"
inotify_add_watch("/var/lib/samba/usershares") failed: "Permission denied"
qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method
qt.network.ssl: QSslSocket: cannot resolve SSLv2_server_method
Comment 3 Kevin Funk 2017-07-24 07:49:49 UTC
> inotify_add_watch("/var/lib/samba/usershares") failed: "Permission denied"

Is your project hosted on a network share attached to your computer?
Comment 4 programmerjake 2017-07-24 14:11:29 UTC
(In reply to Kevin Funk from comment #3)
> > inotify_add_watch("/var/lib/samba/usershares") failed: "Permission denied"
> 
> Is your project hosted on a network share attached to your computer?

no, it's on the local disk, ext4 formatted.
Comment 5 Justin Zobel 2022-11-06 09:24:46 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 6 Bug Janitor Service 2022-11-21 05:14:34 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Bug Janitor Service 2022-12-06 05:21:16 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!