Skip to content

Conversation

@narnaud
Copy link
Member

@narnaud narnaud commented Sep 25, 2025

perf: Use a query for toggling section

This is faster than getting all the symbols, as we don't need to do any
kind of processing of the symbols.

perf: Optimize symbols creation

No need to get the text from the document every time, this reduce the
complexity a lot.
Also squeeze the text from the range, to avoid using too much memory (as
the string is the size of the file).

perf: Bypass logger if it's not needed

We don't need to do anything if we can't log, so bypass the logger
entirely.
Also bypass a copy of the file during TextDocument::text(), as it's not

We don't need to do anything if we can't log, so bypass the logger
entirely.
Also bypass a copy of the file during TextDocument::text(), as it's not
something the user will do.
@narnaud narnaud changed the title perf: Use a query for toggling section Code optimization, especially toggling section Sep 25, 2025
Nicolas Arnaud-Cormos added 2 commits September 25, 2025 14:14
No need to get the text from the document every time, this reduce the
complexity a lot.
Also squeeze the text from the range, to avoid using too much memory (as
the string is the size of the file).
This is faster than getting all the symbols, as we don't need to do any
kind of processing of the symbols.
@narnaud narnaud merged commit 246a283 into KDAB:main Dec 13, 2025
5 checks passed
@narnaud narnaud deleted the opti branch December 13, 2025 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant