Skip to content

Refactor multi-selection expression evaluation logic#1

Closed
RealMalWare wants to merge 1 commit into
masterfrom
RealMalWare-patch-RectEval
Closed

Refactor multi-selection expression evaluation logic#1
RealMalWare wants to merge 1 commit into
masterfrom
RealMalWare-patch-RectEval

Conversation

@RealMalWare

Copy link
Copy Markdown
Owner

Previously, each selection range was appended to an ever-growing buffer. So StringCchCatA had to search for the end of the buffer every single time. In addition, character set conversion and currency cleanup were performed again on the growing buffer in each iteration.
This became very slow when dealing with large rectangular selections -->many ranges.

The fix stores the current write position in the buffer using bufPos. New sections are written directly to this position using memcpy.
In addition, character set conversion and currency cleanup are now performed only once after the loop.

The behavior remains the same:
Multiple selected numbers are still combined into a single expression, for example, "1", "2", "3" into "1+2+3".

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