https://bugs.winehq.org/show_bug.cgi?id=47689
Bug ID: 47689 Summary: When DirectWrite rendering is enabled in Notepad++ performance is inacceptable Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: kolan_n@mail.ru Distribution: ---
[Notepad++](https://github.com/notepad-plus-plus/notepad-plus-plus) is an application based on Scintilla. Scintilla is a library for creating textareas.
[DirectWrite](https://docs.microsoft.com/en-us/windows/win32/directwrite/direct-write-port...) is an API for text rendering with subpixel antialiasing which can be hardware-accelerated using Direct2D.
[SCI_SETTECHNOLOGY](https://www.scintilla.org/ScintillaDox.html#SCI_SETTECHNOLOGY) is a enum value identifying a call to Scintilla (in fact it is done using Windows messages). When it is set to values > 0 (SC_TECHNOLOGY_DIRECTWRITE, SC_TECHNOLOGY_DIRECTWRITERETAIN, or SC_TECHNOLOGY_DIRECTWRITEDC), Scintilla uses DirectDraw accelerated via Direct2D for rendering instead of an own surrogate.
In Windows >7 everything works fine.
In Wine performance is damn bad - single screen update takes several seconds.
https://bugs.winehq.org/show_bug.cgi?id=47689
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEEDINFO Ever confirmed|0 |1
--- Comment #1 from Ken Sharp imwellcushtymelike@gmail.com --- And what version are you using? What logs have you provided?
https://bugs.winehq.org/show_bug.cgi?id=47689
KOLANICH kolan_n@mail.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |4.14
--- Comment #2 from KOLANICH kolan_n@mail.ru ---
And what version are you using?
Wine-staging, the one in apt repos. Likely 4.14.
[NPP 4.7.1 64-bit.](https://notepad-plus-plus.org/repository/7.x/7.7.1/npp.7.7.1.bin.x64.7z)
What logs have you provided?
I haven't provided any logs yet. I don't expect them to be helpful in a performance issue, one fixing it still have to do debugging on real software.
https://bugs.winehq.org/show_bug.cgi?id=47689
KOLANICH kolan_n@mail.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Hardware|x86 |x86-64
https://bugs.winehq.org/show_bug.cgi?id=47689
--- Comment #3 from Nikolay Sivov bunglehead@gmail.com --- (In reply to Ken Sharp from comment #1)
And what version are you using? What logs have you provided?
Please try to be polite, it's the least you can do for people taking time to report issues.
https://bugs.winehq.org/show_bug.cgi?id=47689
--- Comment #5 from KOLANICH kolan_n@mail.ru --- Created attachment 67635 --> https://bugs.winehq.org/attachment.cgi?id=67635 Video, showing the problem
https://bugs.winehq.org/show_bug.cgi?id=47689
--- Comment #6 from KOLANICH kolan_n@mail.ru --- Now the plugin is not needed and the feature of enabling DirectWrite is in npp itself.
https://bugs.winehq.org/show_bug.cgi?id=47689
--- Comment #7 from Nikolay Sivov bunglehead@gmail.com --- (In reply to KOLANICH from comment #6)
Now the plugin is not needed and the feature of enabling DirectWrite is in npp itself.
Is it starting with Notepad++ 7.8.8? With 5.11 you should see some improvement in performance, due to cmap access reimplementation. It's possible it's not enough, and unfortunately last time I tested (with 7.8.6), scintilla dwrite backend is poorly optimized itself - it using text layout API, which is meant more for static or rarely updated text, rather than text editors. Basically what happens is that layout object has to be recreated on every text change, and they seem to recreate it even more often.
https://bugs.winehq.org/show_bug.cgi?id=47689
--- Comment #8 from KOLANICH kolan_n@mail.ru ---
Is it starting with Notepad++ 7.8.8?
Yes.
With 5.11 you should see some improvement in performance, due to cmap access reimplementation.
I have tested, yeah, there is some improvement ("waves" of redrawing now move faster), but scrolling is still inacceptably slow :(
scintilla dwrite backend is poorly optimized itself - it using text layout API, which is meant more for static or rarely updated text, rather than text editors. Basically what happens is that layout object has to be recreated on every text change, and they seem to recreate it even more often.
Could you, please, create an issue in the NPP GitHub repo, and maybe in Scintilla bug tracker, about it?
https://bugs.winehq.org/show_bug.cgi?id=47689
--- Comment #9 from Nikolay Sivov bunglehead@gmail.com --- Sorry, I don't have time for that right now, and I didn't do proper profiling either. Can only tell what I learned from the logs and their code.
https://bugs.winehq.org/show_bug.cgi?id=47689
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |performance, source Severity|normal |minor
--- Comment #10 from Ken Sharp imwellcushtymelike@gmail.com --- Please retry in Wine 8.4 or later.
https://bugs.winehq.org/show_bug.cgi?id=47689
Joan sam@roque-worcel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sam@roque-worcel.com
--- Comment #11 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.