| Newsgroups |
gmane.comp.lib.scintilla.devel |
| Message-ID |
<[email protected]> |
Hi Neil,
sorry for being misleading, no, there are multiple documents in a single
window so I switch between them using SCI_SETDOCPOINTER.
When I run through the code in the debugger it looks slightly different
diagnostics 1737887838357 HWND(0x808b4) 5001 WPARAM(0) LPARAM(1)
diagnostics 1737887839368 HWND(0x808b4) 5001 WPARAM(2322579484) LPARAM(0)
and they are caused by needIdleStyling being true.
This seems to be due to the fact that Npp has now enabled IdleStyling for
new scintilla controls.
After I disabled it again in my initialization routine, the high CPU load
is gone.
But why is this happening at all? If I use it only with the one document,
so the current document is always overwritten, the needIdleStyling does not
generate this amount of messages, more precisely, IdleStyle is not called
at all, because needIdleStyling is wrong.
And since Npp does not have this problem and uses multiple documents like
in my dialog, this could indicate that CreateWindow and CreateDialog behave
differently in this regard. Hmm, I will test if a standalone application
behaves the same way with CreateWindow and CreateDialog.
Thx
Eren
Neil Hodgson schrieb am Sonntag, 26. Januar 2025 um 00:22:14 UTC+1:
> ekopalypse:
>
> > I use Scintilla within a Windows dialog.
> > If I now use multiple views within the dialog,
>
> Are there multiple views on a single document?
>
> > then there is increased CPU utilization due to SC_WIN_IDLE messages.
>
> There should only be a need for continued idle processing when word wrap
> or idle styling is enabled. If either of these is on, try with them turned
> off. Otherwise put a trace inside idle processing (Editor::Idle) to see
> what it thinks is being worked on. Doing work inside SCN_UPDATEUI can slow
> things down and modifying Scintilla there could cause more processing.
>
> Outstanding idle messages should be capped at 1 but there could be some
> cases where more occur.
>
> The trace shows subsequent SC_WIN_IDLEs (due to the same wParam start
> time) not originating SC_WIN_IDLEs from the timer firing which would have a
> 0 wParam.
>
> Neil
>
>
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/scintilla-interest/79d327bb-f8d1-4c79-a26c-4a35c0081823n%40googlegroups.com.