https://bugs.winehq.org/show_bug.cgi?id=46787
Bug ID: 46787 Summary: Notepad++ rather slow (GetLocaleInfoEx) Product: Wine Version: 4.2 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: linuxhippy@gmail.com Distribution: ---
Created attachment 63803 --> https://bugs.winehq.org/attachment.cgi?id=63803 sysprof profile screenshot
Running Notepad++-7.6.3 on wine is a rather painful experience, as Notepad++ is rather slow. When keeping a key pressed, characters appear in blocks and Notepad++ consumes 90% cpu.
Please see the sysprof profile attached, it seems a lot of time is spent inside (GetLocaleInfoEx).
https://bugs.winehq.org/show_bug.cgi?id=46787
KOLANICH kolan_n@mail.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |kolan_n@mail.ru
--- Comment #1 from KOLANICH kolan_n@mail.ru --- Created attachment 67658 --> https://bugs.winehq.org/attachment.cgi?id=67658 The video illustrating the problem
https://bugs.winehq.org/show_bug.cgi?id=46787
--- Comment #2 from KOLANICH kolan_n@mail.ru --- The issue in npp bug tracker: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/8510
It should be noted, that in Windows on large files it is also damn damn damn slow, but in Wine it is damn damn damn slow on much smaller files.
https://bugs.winehq.org/show_bug.cgi?id=46787
--- Comment #3 from Nikolay Sivov bunglehead@gmail.com --- What does profiling with wine 5.12 point to? DirectWrite does actually call to GetLocaleInfoEx().
https://bugs.winehq.org/show_bug.cgi?id=46787
Piyush Soni piyush_soni@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |piyush_soni@yahoo.com
--- Comment #4 from Piyush Soni piyush_soni@yahoo.com --- Hi, I see that the linked bug created on Notepad++ project ( https://github.com/notepad-plus-plus/notepad-plus-plus/issues/8510 ) was closed saying there was never any guarantee for it to work satisfactorily on platforms other than Windows. That's pretty disappointing, as the author could have at least tried to help. In any case, I was wondering if anything else can be done about this bug? It's 2022 and there's still no other editor that comes close to Notepad++.
https://bugs.winehq.org/show_bug.cgi?id=46787
--- Comment #5 from Nikolay Sivov bunglehead@gmail.com --- At least in releases I tried, the way directwrite is used is rather suboptimal. As I recall it simply recreated layout object every time text changed. That means that if you have 100 words paragraph and you type a space somewhere in it, all of it gets reshaped. Obviously when files gets larger, shaping time increases.
Now, I don't know if there is some advanced word cache on Windows that reduces the impact, but for the best performance editor should implement layout itself, and use lower level API - GetGlyphs/GetGlyphPlacements.
https://bugs.winehq.org/show_bug.cgi?id=46787
Joan sam@roque-worcel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sam@roque-worcel.com
--- Comment #6 from Joan sam@roque-worcel.com --- I think this issue has been resolved by this patch by Notepad++ developers: https://github.com/notepad-plus-plus/notepad-plus-plus/commit/975d29b30bfd62...
I've tested this issue in latest wine and N++ 8.6.4 and it is no longer present.
https://bugs.winehq.org/show_bug.cgi?id=46787
--- Comment #7 from Nikolay Sivov bunglehead@gmail.com --- That's not a fix as far as wine is concerned, no.
https://bugs.winehq.org/show_bug.cgi?id=46787
--- Comment #8 from Nikolay Sivov bunglehead@gmail.com --- GetLocaleInfoEx() is now using nls data in compatible format, that might already be faster, so maybe another sysprof run with npp 7.6.3 and current wine could show something.
https://bugs.winehq.org/show_bug.cgi?id=46787
--- Comment #9 from Joan sam@roque-worcel.com --- I've just retried with Notepad++ 7.6.3 and it's still extremely slow.
Slowness seems to occur with the autocomplete window. Disabling the window seems to fix the issue. There are several problems with the autocomplete window, such as the fact that it has a "title bar" on top when it shouldn't.
https://bugs.winehq.org/show_bug.cgi?id=46787
Andrew Nguyen arethusa26@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED URL| |https://notepad-plus-plus.o | |rg/downloads/v7.6.3/
--- Comment #10 from Andrew Nguyen arethusa26@gmail.com --- I tried 32-bit Notepad++ 7.6.3 with wine-4.2 and wine-9.9 and under sysprof for comparison. I could identify some overhead from GetLocaleInfoEx under wine-4.2, but it no longer appears to be significant on wine-9.9.
There may be other performance issues with Notepad++, but I think the original issue with slow performance attributable to time spent inside GetLocaleInfoEx is no longer an issue. A new bug should be opened for other Notepad++ issues.
https://bugs.winehq.org/show_bug.cgi?id=46787
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #11 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.10.